naughty: add vertical margin
[awesome.git] / utils / awesome-client
bloba125869b56454f57bf00d62a492d4c0984f9abd4
1 #!/bin/sh
3 # rlwrap provides readline to stuff which doesn't know readline by itself
4 RLWRAP=`which rlwrap 2>/dev/null`
6 if [ "$RLWRAP" != "" ]
7 then
8 if [ "$A_RERUN" = "" ]
9 then
10 A_RERUN="no" exec $RLWRAP $0
12 else
13 USE_READLINE="-e"
16 DBUS_SEND=dbus-send
18 which ${DBUS_SEND} > /dev/null
19 if test $? = 1
20 then
21 echo "E: Unable to find" ${DBUS_SEND}
22 exit 1
25 DBUS_METHOD=org.awesome.Remote.Eval
26 DBUS_PATH=/
27 DBUS_DEST=org.awesome
29 a_dbus_send()
31 $DBUS_SEND --dest=$DBUS_DEST --type=method_call --print-reply $DBUS_PATH \
32 $DBUS_METHOD string:"$1" | tail -n +2
35 while read ${USE_READLINE} -r -p "awesome# " line
37 a_dbus_send "$line"
38 done