wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 482107fc4022866996bba991f808c8f2fb6b5ab2
parent a685afa2a7422f0c614a84fcd8c225439033b190
Author: Kris Maglione <jg@suckless.org>
Date:   Thu, 15 Feb 2007 13:22:24 -0500

Restored original 'wmiir write' semantics, and restored xwrite command.


Diffstat:
rc/wmiirc | 54++++++++++++++++++++++++++++--------------------------
wmiir | 19++++++++-----------
2 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/rc/wmiirc b/rc/wmiirc @@ -21,17 +21,19 @@ RIGHT=l 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 @@ wmiir ls /tag | sed -e 's|/||; /^sel$/d' | 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 --git a/wmiir b/wmiir @@ -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 -