diff options
author | 2009-05-19 12:12:36 +0100 | |
---|---|---|
committer | 2009-05-19 12:12:36 +0100 | |
commit | 87912a756633806cc8fb1d1b19a41109fe4fb86a (patch) | |
tree | 67e03d553459fb14049329e901bc29707b78084c /examples/configs | |
parent | 6eb4c0d4a196dc52e950474afc6fc79341b95960 (diff) | |
parent | d228014222c889eb61150a5aa9b2efaf5259b880 (diff) |
Merge commit 'duc/experimental' into experimental
Conflicts:
examples/configs/sampleconfig-dev
Diffstat (limited to 'examples/configs')
-rw-r--r-- | examples/configs/sampleconfig | 21 | ||||
-rw-r--r-- | examples/configs/sampleconfig-dev | 23 |
2 files changed, 27 insertions, 17 deletions
diff --git a/examples/configs/sampleconfig b/examples/configs/sampleconfig index db4abc2..b19b850 100644 --- a/examples/configs/sampleconfig +++ b/examples/configs/sampleconfig @@ -8,16 +8,17 @@ # from insert mode by combining them with the modkey # TODO: ability to attach misc things (spawn <foo>, script <bar>,.. to internal events) -set history_handler = /usr/share/uzbl/examples/scripts/history.sh -set download_handler = /usr/share/uzbl/examples/scripts/download.sh +# You can use any action in place of spawn +set history_handler = spawn /usr/share/uzbl/examples/scripts/history.sh +set download_handler = spawn /usr/share/uzbl/examples/scripts/download.sh + +# TODO: cookie_handler can't take arbitrary actionsyet set cookie_handler = /usr/share/uzbl/examples/scripts/cookies.sh set minimum_font_size = 6 set default_font_size = 11 # use with bind ... = sh <shell-oneliner> -# notice the '' - it's a spacer to keep bash and sh from shifting the positional parameters -# by one, so they will appear in the same position as with scripts invoked via spawn -set shell_cmd = sh -c %s '' +set shell_cmd = sh -c @@ -40,9 +41,9 @@ set always_insert_mode = 0 #set proxy_url = http://127.0.0.1:8118 #values 0-3 #set http_debug = 0 -#set useragent = uzbl (Webkit %webkit-major%.%webkit-minor%.%webkit-micro%) +#set useragent = uzbl (Webkit WEBKIT_MAJOR.WEBKIT_MINOR.WEBKIT_MICRO) # Example user agent containing everything: -#set useragent = Uzbl (Webkit %webkit-major%.%webkit-minor%.%webkit-micro%) (%sysname% %nodename% %kernrel% %kernver% %arch-system% [%arch-uzbl%]) (Commit %commit%) +set useragent = Uzbl (Webkit WEBKIT_MAJOR.WEBKIT_MINOR.WEBKIT_MICRO) (SYSNAME NODENAME KERNREL KERNVER ARCH_SYSTEM [ARCH_UZBL]) (Commit COMMIT) #set max_conns = 0 #set max_conns_host = 0 @@ -85,7 +86,7 @@ bind u = spawn /usr/share/uzbl/examples/scripts/load_url_from_bookmar bind yurl = spawn /usr/share/uzbl/examples/scripts/yank.sh 8 primary bind ytitle = spawn /usr/share/uzbl/examples/scripts/yank.sh 9 clipboard # does the same as yurl but without needing a script -bind y2url = sh 'echo -n $6 | xclip' +bind y2url = sh "echo -n $6 | xclip" # go the page from primary selection bind p = sh "echo act uri `xclip -selection primary -o` > $4" # go to the page in clipboard @@ -95,7 +96,9 @@ bind S = 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 -bind XS = sh 'echo "act script alert (\"This is sent by the shell via a fifo\")" > "$4"' +# Parameters are separated by spaces and the script body must be one parameter, so enclose it in +# quotes and escape any inner quotes using backslashes +bind XS = sh 'echo "act script alert (\'This is sent by the shell via a fifo\')" > "$4"' # Keyboard based link following: work in progress! No C DOM bindings yet, no click() event for hyperlinks so no referrer set..Quite basic but does the job for now... #hit F to toggle the Hints (now in form of link numbering) bind F= script /usr/share/uzbl/examples/scripts/hint.js diff --git a/examples/configs/sampleconfig-dev b/examples/configs/sampleconfig-dev index fb240dd..a83589f 100644 --- a/examples/configs/sampleconfig-dev +++ b/examples/configs/sampleconfig-dev @@ -8,16 +8,17 @@ # from insert mode by combining them with the modkey # TODO: ability to attach misc things (spawn <foo>, script <bar>,.. to internal events) -set history_handler = ./examples/scripts/history.sh -set download_handler = ./examples/scripts/download.sh +# Usually you want to spawn a script to handle things, but any action (such as sh) can be used +set history_handler = spawn ./examples/scripts/history.sh +set download_handler = spawn ./examples/scripts/download.sh + +# TODO: you can't use actions in cookie handler yet. set cookie_handler = ./examples/scripts/cookies.sh set minimum_font_size = 6 set default_font_size = 11 # use with bind ... = sh <shell-oneliner> -# notice the '' - it's a spacer to keep bash and sh from shifting the positional parameters -# by one, so they will appear in the same position as with scripts invoked via spawn -set shell_cmd = sh -c %s '' +set shell_cmd = sh -c @@ -41,9 +42,9 @@ set always_insert_mode = 0 #set proxy_url = http://127.0.0.1:8118 #values 0-3 #set http_debug = 0 -#set useragent = uzbl (Webkit %webkit-major%.%webkit-minor%.%webkit-micro%) +#set useragent = uzbl (Webkit WEBKIT_MAJOR.WEBKIT_MINOR.WEBKIT_MICRO) # Example user agent containing everything: -#set useragent = Uzbl (Webkit %webkit-major%.%webkit-minor%.%webkit-micro%) (%sysname% %nodename% %kernrel% %kernver% %arch-system% [%arch-uzbl%]) (Commit %commit%) +set useragent = Uzbl (Webkit WEBKIT_MAJOR.WEBKIT_MINOR.WEBKIT_MICRO) (SYSNAME NODENAME KERNREL KERNVER ARCH_SYSTEM [ARCH_UZBL]) (Commit COMMIT) #set max_conns = 0 #set max_conns_host = 0 @@ -79,6 +80,8 @@ bind :wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?searc bind gg _ = uri http://www.google.com/search?q=%s bind i = toggle_insert_mode bind I = toggle_insert_mode 0 # disable insert mode (1 to enable) +# Enclose the executable in quotes if it has spaces. Any additional parameters you use will +# appear AFTER the default parameters bind B = spawn ./examples/scripts/insert_bookmark.sh bind U = spawn ./examples/scripts/load_url_from_history.sh bind u = spawn ./examples/scripts/load_url_from_bookmarks.sh @@ -96,7 +99,11 @@ bind S = 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 -bind XS = sh 'echo "act script alert (\"This is sent by the shell via a fifo\")" > "$4"' +# 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.) +bind XS = sh 'echo "act script alert (\'This is sent by the shell via a fifo\')" > "$4"' # Keyboard based link following: work in progress! No C DOM bindings yet, no click() event for hyperlinks so no referrer set..Quite basic but does the job for now... #hit F to toggle the Hints (now in form of link numbering) bind F= script ./examples/scripts/hint.js |