aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/config/uzbl/config
diff options
context:
space:
mode:
authorGravatar tczy <cy@wre.ath.cx>2010-01-06 06:44:34 +0200
committerGravatar tczy <cy@wre.ath.cx>2010-01-06 06:44:34 +0200
commite302b74a1bf6ff2edd2730bf32e1db28d7caff0a (patch)
tree1de88f97e6b3234004867dabc68d941841eae1bf /examples/config/uzbl/config
parentb073f78bbcb1bbf7699707aa1381df78737b06fc (diff)
parentf7608a8fc48ad98e6d7227c10cf3786e37c4a2ab (diff)
Merge branch 'master' of git://github.com/Dieterbe/uzbl into follow
Diffstat (limited to 'examples/config/uzbl/config')
-rw-r--r--examples/config/uzbl/config47
1 files changed, 25 insertions, 22 deletions
diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config
index d696c19..f8a2058 100644
--- a/examples/config/uzbl/config
+++ b/examples/config/uzbl/config
@@ -39,15 +39,24 @@ set jsh = js var run=Uzbl.run; function get(k){return run("print \\\@"+k)}; func
# === Handlers ===============================================================
-set download_handler = spawn @scripts_dir/download.sh
-set cookie_handler = talk_to_socket $XDG_CACHE_HOME/uzbl/cookie_daemon_socket
-set scheme_handler = sync_spawn @scripts_dir/scheme.py
+# --- Hardcoded event handlers -----------------------------------------------
-# New window handler options
-#set new_window = sh 'echo uri "$8" > $4' # open in same window
-set new_window = sh 'uzbl-browser -u $8' # equivalent to the default behaviour
+# These handlers can't be moved to the new event system yet as we don't
+# support events that can wait for a response from a script.
+set cookie_handler = talk_to_socket $XDG_CACHE_HOME/uzbl/cookie_daemon_socket
+set scheme_handler = sync_spawn @scripts_dir/scheme.py
-# Load start handlers
+# Open in the same window.
+#set new_window = sh 'echo uri "$8" > $4'
+# Open a link in a new window. equivalent to default behavior
+set new_window = sh 'uzbl-browser -u $8'
+
+# --- Optional dynamic event handlers ----------------------------------------
+
+# Download handler
+@on_event DOWNLOAD_REQUEST spawn @scripts_dir/download.sh %s \@proxy_url
+
+# Load start handler
@on_event LOAD_START @set_status <span foreground="khaki">wait</span>
# Load commit handlers
@@ -69,7 +78,7 @@ set new_window = sh 'uzbl-browser -u $8' # equivalent to the default beh
# Switch to command mode if anything else is clicked
@on_event ROOT_ACTIVE @set_mode command
-# Misc on_event handlers
+# Example CONFIG_CHANGED event handler
#@on_event CONFIG_CHANGED print Config changed: %1 = %2
# === Behaviour and appearance ===============================================
@@ -96,6 +105,8 @@ set selected_section = <span foreground="#606060">\@[\@SELECTED_URI]\@</span>
set status_format = <span font_family="monospace">@mode_section @keycmd_section @progress_section @uri_section @name_section @status_section @scroll_section @selected_section</span>
+set title_format_long = \@keycmd_prompt \@raw_modcmd \@raw_keycmd \@TITLE - Uzbl browser <\@NAME> \@SELECTED_URI
+
# Progress bar config
@progress width = 8
# %d = done, %p = pending %c = percent done, %i = int done, %s = spinner,
@@ -230,9 +241,9 @@ set open_new_window = sh 'uzbl-browser -u \@SELECTED_URI'
@cbind N = search_reverse
# --- Web searching binds ---
-@cbind gg<Google:>_ = uri http://www.google.com/search?q=%s
-@cbind \\awiki<Archwiki:>_ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
-@cbind \\wiki<Wikipedia:>_ = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=%s&go=Go
+@cbind gg<Google:>_ = uri http://www.google.com/search?q=\@<encodeURIComponent(%r)>\@
+@cbind \\awiki<Archwiki:>_ = uri http://wiki.archlinux.org/index.php/Special:Search?search=\@<encodeURIComponent(%r)>\@&go=Go
+@cbind \\wiki<Wikipedia:>_ = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=\@<encodeURIComponent(%r)>\@&go=Go
# --- Handy binds ---
# Set function shortcut
@@ -243,6 +254,9 @@ set open_new_window = sh 'uzbl-browser -u \@SELECTED_URI'
@cbind !dump = sh "echo dump_config > $4"
# Reload config
@cbind !reload = sh "sed '/^# === Post-load misc commands/,$d' $1 > $4"
+# Uzbl Terminal. TODO explain why this is useful
+@cbind <Ctrl><Alt>t = sh 'xterm -e "socat unix-connect:$5 -"'
+#@cbind <Ctrl><Alt>t = sh 'urxvt -e socat unix-connect:$5 -'
# --- Uri opening prompts ---
@cbind o<uri:>_ = uri %s
@@ -287,17 +301,6 @@ set toggle_cmd_ins = @toggle_modes command insert
#set follow_hint_keys = thsnd-rcgmvwb/;789aefijkopquxyz234
@cbind f* = script @scripts_dir/follow.js '%s @{follow_hint_keys}'
-
-@cbind 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
-# The body of the shell command should be one parameter, so if it has spaces like here,
-# you must enclose it in quotes. Remember to escape (and double-escape) quotes and backslashes
-# in the body. Any additional parameters you use will appear AFTER the default parameters (cfg file
-# path, fifo & socket dirs, etc.)
-@cbind XS = sh 'echo "js alert (\\"This is sent by the shell via a fifo\\")" > "$4"'
-
# --- Form filler binds ---
# this script allows you to configure (per domain) values to fill in form
# fields (eg login information) and to fill in these values automatically