awesome/utils/awesome-client

32 lines
595 B
Plaintext
Raw Normal View History

#!/bin/sh
# rlwrap provides readline to stuff which doesn't know readline by itself
RLWRAP=`which rlwrap 2>/dev/null`
if [ "$RLWRAP" != "" ] && [ "$A_RERUN" = "" ]
then
A_RERUN="no" exec $RLWRAP $0
fi
DBUS_SEND=dbus-send
if ! which ${DBUS_SEND} >/dev/null 2>&1
then
echo "E: Unable to find" ${DBUS_SEND}
fi
DBUS_METHOD=org.awesome.Remote.Eval
DBUS_PATH=/
DBUS_DEST=org.awesome
a_dbus_send()
{
$DBUS_SEND --dest=$DBUS_DEST --type=method_call --print-reply $DBUS_PATH \
$DBUS_METHOD string:"$1" | tail -n +2
}
while read -p "awesome# " line
do
a_dbus_send "$line"
done