From b5aeb2a323f337d906a6975d01cdcb4e46b9938a Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 27 May 2010 12:25:38 -0400 Subject: [PATCH] Rethink last commit. Give wi_eventloop -i option to read from stdin instead. --- cmd/wmii.sh.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/wmii.sh.sh b/cmd/wmii.sh.sh index e6ece6fc..857cdd56 100755 --- 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/^[^ ]* //')