From f79cd42c33218d15f217eaae53b2a8f9df7c2c45 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 8 Apr 2009 17:30:18 +0200 Subject: [PATCH] import new awesome-client using D-Bus Signed-off-by: Julien Danjou --- utils/awesome-client | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 utils/awesome-client diff --git a/utils/awesome-client b/utils/awesome-client new file mode 100755 index 00000000..4b027cb1 --- /dev/null +++ b/utils/awesome-client @@ -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