aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mason Larobina <mason.larobina@gmail.com>2010-01-02 20:53:07 +0800
committerGravatar Mason Larobina <mason.larobina@gmail.com>2010-01-02 20:53:07 +0800
commit0482aae0aed75e333225c45312c260f63a888517 (patch)
tree00982dc0f00b070bf4546a14f00771e050290e66
parentcf68b7328ed9a8eebe4033ccccc8016d5afb5de2 (diff)
Updated comments in handlers section and updated the download handler
-rw-r--r--examples/config/uzbl/config25
1 files changed, 17 insertions, 8 deletions
diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config
index bf08c9e..4782a0d 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'
+# 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.
+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'
# 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 ===============================================