aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-06-08 22:48:12 +0200
committerGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-06-08 22:48:12 +0200
commit087bca445cd96d69a5fe9aa56b7ba88e9f9f7de6 (patch)
treefb218afbaadb098fb9c5427a6d21a2580f2d0e62 /examples
parentd3cb6e5f11499f5b76f7e3d2fbb8bb0abc527f7e (diff)
slightly better example config with a few new cool examples
Diffstat (limited to 'examples')
-rw-r--r--examples/config/uzbl/config35
1 files changed, 24 insertions, 11 deletions
diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config
index 9606edd..dcb00fd 100644
--- a/examples/config/uzbl/config
+++ b/examples/config/uzbl/config
@@ -1,18 +1,22 @@
-
-# example uzbl config. in a real config, we should obey the xdg spec
+# example uzbl config.
# all settings are optional. you can use uzbl without any config at all (but it won't do much)
-# keyboard behavior is vimstyle by default (all commands -> 1 key). set
-# always_insert_mode to always be in insert mode and disable going out of it.
+# keyboard behavior is vimstyle by default, but you can change this
+# set always_insert_mode to always be in insert mode and disable going out of it.
# if you do this, make sure you've set a modkey so you can reach the commands
# from insert mode by combining them with the modkey
-# TODO: ability to attach misc things (spawn <foo>, script <bar>,.. to internal events)
# Usually you want to spawn a script to handle things, but any command (such as sh) can be used
set history_handler = spawn $XDG_DATA_HOME/uzbl/scripts/history.sh
set download_handler = spawn $XDG_DATA_HOME/uzbl/scripts/download.sh
set cookie_handler = spawn $XDG_DATA_HOME/uzbl/scripts/cookies.py
+# You can bind whatever things (spawn <foo>, script <bar>,..) to some events TODO: make events system more generic
+set load_start_handler = set status_message = <span foreground="khaki">wait</span>
+set load_commit_handler = set status_message = <span foreground="green">recv</span>
+set load_finish_handler = set status_message = <span foreground="gold">done</span>
+
+
set minimum_font_size = 6
set font_size = 11
## monospace_size defaults to font_size, but you can alter it independently
@@ -61,7 +65,7 @@ set show_status = 1
# you can optionally use this setting to override the background color of the statusbar from your GTK theme.
set status_background = #303030
set status_format = <span font_family="monospace"><span background="khaki" foreground="black">[MODE]</span> [<span weight="bold" foreground="red">KEYCMD</span>] <span foreground="#606060"> LOAD_PROGRESSBAR </span><span foreground="#99FF66">URI</span> <span foreground="khaki">NAME</span> <span foreground="orange">MSG</span><span foreground="#606060">SELECTED_URI</span></span>
-set status_top = 0
+set status_top = 0
# define how your titlebar should look like. (short = statusbar is also shown, long = show everything you must see if statusbar is off)
set title_format_short = TITLE - Uzbl browser <NAME>
set title_format_long = KEYCMD MODE TITLE - Uzbl browser <NAME> > SELECTED_URI
@@ -99,7 +103,7 @@ bind << = scroll_begin
bind >> = scroll_end
bind b = back
bind m = forward
-bind s = stop
+bind S = stop
bind r = reload
bind R = reload_ign_cache
bind + = zoom_in
@@ -116,9 +120,15 @@ bind ?* = search_reverse %s
bind n = search
bind N = search_reverse
bind gh = uri http://www.uzbl.org
-#TODO: set uri?
+
+# like this you can enter any command at runtime, interactively. prefixed by ':'
+bind :_ = chain '%s'
+
+# shortcut to set the uri. TODO: i think we can abandon the uri command in favor of 'set uri = ..'
bind o _ = uri %s
-bind :wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
+# shortcut to set variables
+bind s _ = set %s
+bind \wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
bind gg _ = uri http://www.google.com/search?q=%s
bind i = toggle_insert_mode
# disable insert mode (1 to enable). note that Esc works to disable, regardless of this setting
@@ -138,7 +148,7 @@ bind p = sh 'echo "uri `xclip -selection primary -o`" > $4'
# go to the page in clipboard
bind P = sh 'echo "uri `xclip -selection clipboard -o`" > $4'
bind ZZ = exit
-bind S = js alert("hi");
+bind Xs = js alert("hi");
# example showing how to use sh
# it sends a command to the fifo, whose path is told via a positional param
# if fifo_dir is not set, it'll echo to a file named (null) somewhere >:) remember to delete it
@@ -147,7 +157,10 @@ bind S = js alert("hi");
# in the body. Any additional parameters you use will appear AFTER the default parameters (cfg file
# path, fifo & socket dirs, etc.)
bind XS = sh 'echo "js alert (\\"This is sent by the shell via a fifo\\")" > "$4"'
-bind dump = sh "echo dump_config > $4"
+
+bind !dump = sh "echo dump_config > $4"
+bind !reload = sh 'cat $1 > $4'
+
# this script allows you to configure (per domain) values to fill in form fields (eg login information) and to fill in these values automatically
bind za = spawn $XDG_DATA_HOME/uzbl/scripts/formfiller.sh
bind ze = spawn $XDG_DATA_HOME/uzbl/scripts/formfiller.sh edit