[hackers] [wmii] Made wmiir write behave like wmiir echo instead.

From: Denis Grelich <denisg_AT_suckless.org>
Date: Thu Feb 15 16:41:07 2007

changeset: 1881:dc75d0d0f393
tag: tip
user: Denis Grelich <denisg_AT_suckless.org>
date: Thu Feb 15 16:38:06 2007 +0100
summary: Made wmiir write behave like wmiir echo instead.

diff -r c78932915818 -r dc75d0d0f393 rc/wmiirc
--- a/rc/wmiirc Thu Feb 15 16:20:45 2007 +0100
+++ b/rc/wmiirc Thu Feb 15 16:38:06 2007 +0100
@@ -165,67 +165,67 @@ do
                 wmiir remove "/lbar/$parms"
                 ;;
         FocusTag)
- wmiir echo "/lbar/$parms" "$WMII_FOCUSCOLORS" "$parms"
+ wmiir write "/lbar/$parms" "$WMII_FOCUSCOLORS" "$parms"
                 ;;
         UnfocusTag)
- wmiir echo "/lbar/$parms" "$WMII_NORMCOLORS" "$parms"
+ wmiir write "/lbar/$parms" "$WMII_NORMCOLORS" "$parms"
                 ;;
         UrgentTag)
                 shift
- wmiir echo "/lbar/$@" "*$@"
+ wmiir write "/lbar/$@" "*$@"
                 ;;
         NotUrgentTag)
                 shift
- wmiir echo "/lbar/$@" "$@"
+ wmiir write "/lbar/$@" "$@"
                 ;;
         LeftBarClick)
                 shift
- wmiir echo /ctl view "$@";;
+ wmiir write /ctl view "$@";;
         Key)
                 key="$1"
                 case "$key" in
                 $MODKEY-$LEFT)
- wmiir echo /tag/sel/ctl select left;;
+ wmiir write /tag/sel/ctl select left;;
                 $MODKEY-$RIGHT)
- wmiir echo /tag/sel/ctl select right;;
+ wmiir write /tag/sel/ctl select right;;
                 $MODKEY-$DOWN)
- wmiir echo /tag/sel/ctl select down;;
+ wmiir write /tag/sel/ctl select down;;
                 $MODKEY-$UP)
- wmiir echo /tag/sel/ctl select up;;
+ wmiir write /tag/sel/ctl select up;;
                 $MODKEY-space)
- wmiir echo /tag/sel/ctl select toggle;;
+ wmiir write /tag/sel/ctl select toggle;;
                 $MODKEY-d)
- wmiir echo /tag/sel/ctl colmode sel default;;
+ wmiir write /tag/sel/ctl colmode sel default;;
                 $MODKEY-s)
- wmiir echo /tag/sel/ctl colmode sel stack;;
+ wmiir write /tag/sel/ctl colmode sel stack;;
                 $MODKEY-m)
- wmiir echo /tag/sel/ctl colmode sel max;;
+ wmiir write /tag/sel/ctl colmode sel max;;
                 $MODKEY-a)
                         `conf_which "$(proglist $ACTIONS_DIRS | $DMENU)"` &;;
                 $MODKEY-p)
                         sh -c "`$DMENU <$PROGS_FILE`" &;;
                 $MODKEY-t)
- wmiir echo /ctl "view `tagsmenu`" &;;
+ wmiir write /ctl "view `tagsmenu`" &;;
                 $MODKEY-[0-9])
- wmiir echo /ctl view "`echo $key | sed 's/.*-//'`";;
+ wmiir write /ctl view "`echo $key | sed 's/.*-//'`";;
                 $MODKEY-Return)
                         $WMII_TERM &;;
                 $MODKEY-Shift-$LEFT)
- wmiir echo /tag/sel/ctl send sel left;;
+ wmiir write /tag/sel/ctl send sel left;;
                 $MODKEY-Shift-$RIGHT)
- wmiir echo /tag/sel/ctl send sel right;;
+ wmiir write /tag/sel/ctl send sel right;;
                 $MODKEY-Shift-$DOWN)
- wmiir echo /tag/sel/ctl send sel down;;
+ wmiir write /tag/sel/ctl send sel down;;
                 $MODKEY-Shift-$UP)
- wmiir echo /tag/sel/ctl send sel up;;
+ wmiir write /tag/sel/ctl send sel up;;
                 $MODKEY-Shift-space)
- wmiir echo /tag/sel/ctl send sel toggle;;
+ wmiir write /tag/sel/ctl send sel toggle;;
                 $MODKEY-Shift-c)
- wmiir echo /client/sel/ctl kill;;
+ wmiir write /client/sel/ctl kill;;
                 $MODKEY-Shift-t)
- wmiir echo "/client/`wmiir read /client/sel/ctl`/tags" "`tagsmenu`" &;;
+ wmiir write "/client/`wmiir read /client/sel/ctl`/tags" "`tagsmenu`" &;;
                 $MODKEY-Shift-[0-9])
- wmiir echo /client/sel/tags "`echo $key | sed 's/.*-//'`";;
+ wmiir write /client/sel/tags "`echo $key | sed 's/.*-//'`";;
                 esac;;
         esac
 done &
diff -r c78932915818 -r dc75d0d0f393 wmiir
--- a/wmiir Thu Feb 15 16:20:45 2007 +0100
+++ b/wmiir Thu Feb 15 16:38:06 2007 +0100
@@ -6,9 +6,9 @@ while [ "`echo '$1' | head -c 1`" = '-'
         flags="$flags $1" ; shift
 done
 
-if [ "$1" = 'echo' ]; then
- file="$2"; shift 2
- echo "$@" | ixpc $flags write $file
+if [ -n "$3" ]; then
+ com="$1"; file="$2"; shift 2
+ echo "$@" | ixpc $flags $com $file
 else
         exec ixpc $flags $@
 fi
Received on Thu Feb 15 2007 - 16:41:07 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:20 UTC