aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/follow.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/data/scripts/follow.sh')
-rw-r--r--examples/data/scripts/follow.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh
new file mode 100644
index 0000000..44a0d55
--- /dev/null
+++ b/examples/data/scripts/follow.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+config=$1;
+shift
+pid=$1;
+shift
+xid=$1;
+shift
+fifo=$1;
+shift
+socket=$1;
+shift
+url=$1;
+shift
+title=$1;
+shift
+
+echo 'script @scripts_dir/follow.js "@{follow_hint_keys} '$1'"' | socat - unix-connect:$socket
+
+# Read variable set by script. If it equals XXXFORMELEMENTCLICKEDXXX emit
+# FORM_ACTIVE event
+echo 'js rv' \
+ | socat - unix-connect:$socket \
+ | grep -q XXXINPUTELEMENTCLICKEDXXX \
+ && echo 'event FORM_ACTIVE' \
+ | socat - unix-connect:$socket