aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/follow.sh
blob: 44a0d556e0726f29355317354ca81c82d5b9643b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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