3 if [ "x" = "x${DBUS_SESSION_BUS_ADDRESS}" ]; then
4 DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"
6 export DBUS_SESSION_BUS_ADDRESS
9 sed ' /^method return .*/d
10 s/^Error org.freedesktop.DBus.Error.Failed: "\?\(.*\)"\?$/ERROR: \1/
11 s/^ string "\(.*\)"/\1/
17 /[]}],*$/ {x;s:...::;x}
20 s:^\(.*[^\n]\)\n\( *\)$:\2\1:
25 dbus-send --session --print-reply \
26 --dest=org.AGL.afm.user \
31 return ${PIPESTATUS[0]}
42 send install '{"wgt":"'"$f"'","force":true}'
47 send uninstall "\"$i\""
64 run-remote|start-remote)
66 send start '{"id":"'"$i"'","mode":"remote"}'
96 usage: $(basename $0) command [arg]
101 runnables list the runnable widgets installed
104 install wgt install the wgt file
107 uninstall id remove the installed widget of id
110 detail id print detail about the installed widget of id
113 runners list the running instance
116 start id start an instance of the widget of id
118 once id run once an instance of the widget of id
121 terminate rid terminate the running instance rid
124 pause rid pause the running instance rid
127 continue rid continue the previously paused rid
130 state rid get status of the running instance rid
136 echo "unknown command $1" >&2