diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2011-03-11 20:45:32 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2011-03-11 20:45:32 -0500 |
commit | 6b2a973e17a0cf4d3cdc88e71973624929018c78 (patch) | |
tree | 7f6ea0734b348d45728136e07f2f94ba18a9eb42 /examples | |
parent | 6c2890bbc664fb067bafda638417b92dc9fdd58d (diff) |
Allow the variable for follow.sh to be changed
Diffstat (limited to 'examples')
-rw-r--r-- | examples/config/config | 2 | ||||
-rwxr-xr-x | examples/data/scripts/follow.sh | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/examples/config/config b/examples/config/config index a2ecdb8..b5421da 100644 --- a/examples/config/config +++ b/examples/config/config @@ -309,7 +309,7 @@ set follow_hint_keys = 0123456789 #set follow_hint_keys = qwerty #set follow_hint_keys = asdfghjkl; #set follow_hint_keys = thsnd-rcgmvwb/;789aefijkopquxyz234 -@cbind fl* = spawn @scripts_dir/follow.sh "%s" +@cbind fl* = spawn @scripts_dir/follow.sh follow_hint_keys "%s" @cbind gi = spawn @scripts_dir/go_input.sh # Form filler binds diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index 4edab36..6401188 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -5,17 +5,20 @@ . "$UZBL_UTIL_DIR/uzbl-util.sh" +key_variable="$1" +shift + keys="$1" shift # if socat is installed then we can change Uzbl's input mode once a link is # selected; otherwise we just select a link. if ! which socat >/dev/null 2>&1; then - print "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"\n" > "$UZBL_FIFO" + print "script @scripts_dir/follow.js \"@{$key_variable} $keys\"\n" > "$UZBL_FIFO" exit 0 fi -result="$( print "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"\n" | socat - "unix-connect:$UZBL_SOCKET" )" +result="$( print "script @scripts_dir/follow.js \"@{$key_variable} $keys\"\n" | socat - "unix-connect:$UZBL_SOCKET" )" case $result in *XXXEMIT_FORM_ACTIVEXXX*) # a form element was selected |