awful.menu: support for access keys
[awesome.git] / utils / awesome-client
blobf1e036ccd5436891d2f2e5e480b75e7a73f0d0c1
1 #!/bin/sh
3 # rlwrap provides readline to stuff which doesn't know readline by itself
4 RLWRAP=$(which rlwrap 2>/dev/null)
5 READ_OPTIONS="-r"
7 if [ "$RLWRAP" != "" ]
8 then
9 if [ "$A_RERUN" = "" ]
10 then
11 A_RERUN="no" exec $RLWRAP $0
13 else
14 if [ "$BASH" ]
15 then
16 READ_PARAMETERS=" -e"
20 if [ $BASH ]
21 then
22 READ_OPTIONS="$READ_OPTIONS -p awesome# "
25 DBUS_SEND=dbus-send
27 which ${DBUS_SEND} > /dev/null
28 if test $? = 1
29 then
30 echo "E: Unable to find" ${DBUS_SEND}
31 exit 1
34 DBUS_PATH=/
35 DBUS_DEST=org.naquadah.awesome.awful
36 DBUS_METHOD=${DBUS_DEST}.Remote.Eval
38 a_dbus_send()
40 $DBUS_SEND --dest=$DBUS_DEST --type=method_call --print-reply $DBUS_PATH \
41 $DBUS_METHOD string:"$1" | tail -n +2
44 while read ${USE_READLINE} ${READ_OPTIONS} line
46 a_dbus_send "$line"
47 done