[hackers] [wmii] Restored original 'wmiir write' semantics, and restored xwrite command.

From: Kris Maglione <jg_AT_suckless.org>
Date: Thu Feb 15 19:26:20 2007

changeset: 1883:9f9f3bbf699d
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Feb 15 13:22:24 2007 -0500
summary: Restored original 'wmiir write' semantics, and restored xwrite command.

diff -r 67c8788100ac -r 9f9f3bbf699d rc/wmiirc
--- a/rc/wmiirc Thu Feb 15 10:06:35 2007 -0800
+++ b/rc/wmiirc Thu Feb 15 13:22:24 2007 -0500
@@ -21,17 +21,19 @@ WMII_FONT='-*-fixed-medium-r-normal-*-13
 WMII_FONT='-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*'
 # Colors tuples are "<text> <background> <border>"
 WMII_NORMCOLORS='#222222 #eeeeee #666666'
-WMII_SELCOLORS='#ffffff #335577 #447799'
+WMII_SELCOLORS='#444444 #bbbbbb #556088'
+WMII_FOCUSCOLORS='#ffffff #335577 #447799'
 WMII_BACKGROUND='#333333'
 
 DMENU="dmenu -b -fn $WMII_FONT -nb #eeeeee -nf #222222 -sb #335577 -sf #ffffff"
 WMII_TERM="xterm"
 
-export DMENU WMII_FONT WMII_SELCOLORS WMII_NORMCOLORS WMII_TERM
+export DMENU WMII_FONT WMII_FOCUSCOLORS WMII_SELCOLORS WMII_NORMCOLORS WMII_TERM
 
 # WM CONFIGURATION
 wmiir write /ctl << EOF
 font $WMII_FONT
+focuscolors $WMII_FOCUSCOLORS
 selcolors $WMII_SELCOLORS
 normcolors $WMII_NORMCOLORS
 grabmod $MODKEY
@@ -92,7 +94,7 @@ while read tag
 while read tag
 do
         if [ "X$tag" = "X$seltag" ]; then
- echo "$WMII_SELCOLORS" "$tag" | wmiir create "/lbar/$tag"
+ echo "$WMII_FOCUSCOLORS" "$tag" | wmiir create "/lbar/$tag"
         else
                 echo "$WMII_NORMCOLORS" "$tag" | wmiir create "/lbar/$tag"
         fi
@@ -163,67 +165,67 @@ do
                 wmiir remove "/lbar/$parms"
                 ;;
         FocusTag)
- wmiir write "/lbar/$parms" "$WMII_SELCOLORS" "$parms"
+ wmiir xwrite "/lbar/$parms" "$WMII_FOCUSCOLORS" "$parms"
                 ;;
         UnfocusTag)
- wmiir write "/lbar/$parms" "$WMII_NORMCOLORS" "$parms"
+ wmiir xwrite "/lbar/$parms" "$WMII_NORMCOLORS" "$parms"
                 ;;
         UrgentTag)
                 shift
- wmiir write "/lbar/$@" "*$@"
+ wmiir xwrite "/lbar/$@" "*$@"
                 ;;
         NotUrgentTag)
                 shift
- wmiir write "/lbar/$@" "$@"
+ wmiir xwrite "/lbar/$@" "$@"
                 ;;
         LeftBarClick)
                 shift
- wmiir write /ctl view "$@";;
+ wmiir xwrite /ctl view "$@";;
         Key)
                 key="$1"
                 case "$key" in
                 $MODKEY-$LEFT)
- wmiir write /tag/sel/ctl select left;;
+ wmiir xwrite /tag/sel/ctl select left;;
                 $MODKEY-$RIGHT)
- wmiir write /tag/sel/ctl select right;;
+ wmiir xwrite /tag/sel/ctl select right;;
                 $MODKEY-$DOWN)
- wmiir write /tag/sel/ctl select down;;
+ wmiir xwrite /tag/sel/ctl select down;;
                 $MODKEY-$UP)
- wmiir write /tag/sel/ctl select up;;
+ wmiir xwrite /tag/sel/ctl select up;;
                 $MODKEY-space)
- wmiir write /tag/sel/ctl select toggle;;
+ wmiir xwrite /tag/sel/ctl select toggle;;
                 $MODKEY-d)
- wmiir write /tag/sel/ctl colmode sel default;;
+ wmiir xwrite /tag/sel/ctl colmode sel default;;
                 $MODKEY-s)
- wmiir write /tag/sel/ctl colmode sel stack;;
+ wmiir xwrite /tag/sel/ctl colmode sel stack;;
                 $MODKEY-m)
- wmiir write /tag/sel/ctl colmode sel max;;
+ wmiir xwrite /tag/sel/ctl colmode sel max;;
                 $MODKEY-a)
                         `conf_which "$(proglist $ACTIONS_DIRS | $DMENU)"` &;;
                 $MODKEY-p)
                         sh -c "`$DMENU <$PROGS_FILE`" &;;
                 $MODKEY-t)
- wmiir write /ctl "view `tagsmenu`" &;;
+ wmiir xwrite /ctl "view `tagsmenu`" &;;
                 $MODKEY-[0-9])
- wmiir write /ctl view "`echo $key | sed 's/.*-//'`";;
+ wmiir xwrite /ctl view "`echo $key | sed 's/.*-//'`";;
                 $MODKEY-Return)
                         $WMII_TERM &;;
                 $MODKEY-Shift-$LEFT)
- wmiir write /tag/sel/ctl send sel left;;
+ wmiir xwrite /tag/sel/ctl send sel left;;
                 $MODKEY-Shift-$RIGHT)
- wmiir write /tag/sel/ctl send sel right;;
+ wmiir xwrite /tag/sel/ctl send sel right;;
                 $MODKEY-Shift-$DOWN)
- wmiir write /tag/sel/ctl send sel down;;
+ wmiir xwrite /tag/sel/ctl send sel down;;
                 $MODKEY-Shift-$UP)
- wmiir write /tag/sel/ctl send sel up;;
+ wmiir xwrite /tag/sel/ctl send sel up;;
                 $MODKEY-Shift-space)
- wmiir write /tag/sel/ctl send sel toggle;;
+ wmiir xwrite /tag/sel/ctl send sel toggle;;
                 $MODKEY-Shift-c)
- wmiir write /client/sel/ctl kill;;
+ wmiir xwrite /client/sel/ctl kill;;
                 $MODKEY-Shift-t)
- wmiir write "/client/`wmiir read /client/sel/ctl`/tags" "`tagsmenu`" &;;
+ wmiir xwrite "/client/`wmiir read /client/sel/ctl`/tags" "`tagsmenu`" &;;
                 $MODKEY-Shift-[0-9])
- wmiir write /client/sel/tags "`echo $key | sed 's/.*-//'`";;
+ wmiir xwrite /client/sel/tags "`echo $key | sed 's/.*-//'`";;
                 esac;;
         esac
 done &
diff -r 67c8788100ac -r 9f9f3bbf699d wmiir
--- a/wmiir Thu Feb 15 10:06:35 2007 -0800
+++ b/wmiir Thu Feb 15 13:22:24 2007 -0500
@@ -1,15 +1,12 @@
 #!/bin/sh
 export IXP_ADDRESS="$WMII_ADDRESS"
-
-flags=
-while [ "`echo '$1' | head -c 1`" = '-' ]; do
- flags="$flags $1" ; shift
-done
-
-if [ -n "$3" ]; then
- com="$1"; file="$2"; shift 2
- echo "$@" | ixpc $flags $com $file
+flag=
+if [ "$1" = -v ]; then
+ flag=-v; shift
+fi
+if [ "$1" = xwrite ]; then
+ file="$2"; shift 2
+ echo "$@" | ixpc $flag write $file
 else
- exec ixpc $flags $@
+ exec ixpc $flag $@
 fi
-
Received on Thu Feb 15 2007 - 19:26:20 UTC

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