import new awesome-client using D-Bus

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-08 17:30:18 +02:00
parent 36f4e6cb8a
commit f79cd42c33
1 changed files with 23 additions and 0 deletions

23
utils/awesome-client Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
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