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 \
23 return ${PIPESTATUS[0]}
34 send install '{"wgt":"'"$f"'","force":true}'
39 send uninstall "\"$i\""
56 run-remote|start-remote)
58 send start '{"id":"'"$i"'","mode":"remote"}'
88 usage: $(basename $0) command [arg]
93 runnables list the runnable widgets installed
96 install wgt install the wgt file
99 uninstall id remove the installed widget of id
102 detail id print detail about the installed widget of id
105 runners list the running instance
108 start id start an instance of the widget of id
110 once id run once an instance of the widget of id
113 terminate rid terminate the running instance rid
116 pause rid pause the running instance rid
119 continue rid continue the previously paused rid
122 state rid get status of the running instance rid
128 echo "unknown command $1" >&2