From 0482aae0aed75e333225c45312c260f63a888517 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Sat, 2 Jan 2010 20:53:07 +0800 Subject: Updated comments in handlers section and updated the download handler --- examples/config/uzbl/config | 25 +++++++++++++++++-------- 1 file 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 wait # 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 =============================================== -- cgit v1.2.3