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
10 -e '/^method return .*/d' \
11 -e 's/^Error org.freedesktop.DBus.Error.Failed: "\?\(.*\)"\?$/ERROR: \1/' \
12 -e 's/^ string "\(.*\)"/\1/' \
17 dbus-send --session --print-reply \
18 --dest=org.AGL.afm.user \
33 send install '{"wgt":"'"$f"'","force":true}'
38 send uninstall "\"$i\""
55 run-remote|start-remote)
57 send start '{"id":"'"$i"'","mode":"remote"}'
87 usage: $(basename $0) command [arg]
92 runnables list the runnable widgets installed
95 install wgt install the wgt file
98 uninstall id remove the installed widget of id
101 detail id print detail about the installed widget of id
104 runners list the running instance
107 start id start an instance of the widget of id
109 once id run once an instance of the widget of id
112 terminate rid terminate the running instance rid
115 pause rid pause the running instance rid
118 continue rid continue the previously paused rid
121 state rid get status of the running instance rid
127 echo "unknown command $1" >&2