commit b5aeb2a323f337d906a6975d01cdcb4e46b9938a
parent 9475f7746afa6a224b294abd7c2a77c30b09b420
Author: Kris Maglione <kris@suckless.org>
Date: Thu, 27 May 2010 12:25:38 -0400
Rethink last commit. Give wi_eventloop -i option to read from stdin instead.
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/cmd/wmii.sh.sh b/cmd/wmii.sh.sh
@@ -190,14 +190,13 @@ wi_selclient() {
wmiir read /client/sel/ctl | sed 1q | tr -d '\012'
}
-wi_readevent() {
- wmiir read /event
-}
-
wi_eventloop() {
echo "$Keys" | wmiir write /keys
- wi_readevent | while read wi_event
+ if [ "$1" = -i ]
+ then cat
+ else wmiir read /event
+ fi | while read wi_event
do
IFS="$wi_newline"
wi_arg=$(echo "$wi_event" | sed 's/^[^ ]* //')