changeset: 2650:7a9af8061e31
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Thu May 27 12:25:38 2010 -0400
files: cmd/wmii.sh.sh
description:
Rethink last commit. Give wi_eventloop -i option to read from stdin instead.
diff -r 0ad4aab86f50 -r 7a9af8061e31 cmd/wmii.sh.sh
--- a/cmd/wmii.sh.sh Thu May 27 12:16:55 2010 -0400
+++ b/cmd/wmii.sh.sh Thu May 27 12:25:38 2010 -0400
@@ -190,14 +190,13 @@
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/^[^ ]* //')
Received on Thu May 27 2010 - 16:25:48 UTC
This archive was generated by hypermail 2.2.0 : Thu May 27 2010 - 16:36:04 UTC