From 1197e8ddbc8348e9437ada42b35c72f38d4698ce Mon Sep 17 00:00:00 2001 From: keis Date: Sat, 26 Feb 2011 23:56:45 +0100 Subject: update config and follow.sh to use new follow.js --- examples/data/scripts/follow.sh | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'examples/data') diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index d7fe117..1f8947d 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -1,21 +1,11 @@ #!/bin/sh +# This scripts acts on the return value of followLinks in follow.js -# This script is just a wrapper around follow.js that lets us change uzbl's mode -# after a link is selected. - -# 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 - echo 'script @scripts_dir/follow.js "@{follow_hint_keys} '$1'"' > "$UZBL_FIFO" - exit -fi - -result=$(echo 'script @scripts_dir/follow.js "@{follow_hint_keys} '$1'"' | socat - unix-connect:"$UZBL_SOCKET") -case $result in - *XXXEMIT_FORM_ACTIVEXXX*) +case "$1" in + XXXEMIT_FORM_ACTIVEXXX) # a form element was selected - echo 'event FORM_ACTIVE' > "$UZBL_FIFO" ;; - *XXXRESET_MODEXXX*) + printf 'event FORM_ACTIVE\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" ;; + XXXRESET_MODEXXX) # a link was selected, reset uzbl's input mode printf 'set mode=\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" ;; esac -- cgit v1.2.3