diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-10-15 14:33:31 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-10-15 20:22:26 -0400 |
commit | f5f19ca8e8d46ba1087f8531e2309ac392c24112 (patch) | |
tree | 009c0b9baf3d024347a3149e698a1b8313d8d900 /.wmii/wmiirc | |
parent | 4493d30ac4c747b08b2107a440084245a9157bd4 (diff) |
wmii: phase out wmiir
Diffstat (limited to '.wmii/wmiirc')
-rwxr-xr-x | .wmii/wmiirc | 84 |
1 files changed, 36 insertions, 48 deletions
diff --git a/.wmii/wmiirc b/.wmii/wmiirc index 8d77394..1e88128 100755 --- a/.wmii/wmiirc +++ b/.wmii/wmiirc @@ -84,9 +84,9 @@ Event() { { case `wmii9menu Delete Fullscreen` in Delete) - echo kill |a $WMII_DIR/client/$client/ctl;; + echo kill >> $WMII_DIR/client/$client/ctl;; Fullscreen) - echo Fullscreen on |a $WMII_DIR/client/$1/ctl;; + echo Fullscreen on >> $WMII_DIR/client/$1/ctl;; esac }& ;; esac;; @@ -101,7 +101,7 @@ Event() { resp=$(wihack -transient $client \ xmessage -nearmouse -buttons Kill,Wait -print "$msg") if [ "$resp" = Kill ]; then - echo slay |a $WMII_DIR/client/$client/ctl + echo slay >> $WMII_DIR/client/$client/ctl fi }& ;; Fullscreen) ## $1=client $2=[on|off] @@ -110,24 +110,24 @@ Event() { ## Tag events CreateTag) ## $1=tag - echo "$WMII_NORMCOLORS" $@ |a $WMII_DIR/lbar/$1;; + echo "$WMII_NORMCOLORS" $@ >> $WMII_DIR/lbar/$1;; DestroyTag) ## $1=tag rm $WMII_DIR/lbar/$1;; FocusTag) ## $1=tag - echo "$WMII_FOCUSCOLORS" $1 |a $WMII_DIR/lbar/$1;; + echo "$WMII_FOCUSCOLORS" $1 >> $WMII_DIR/lbar/$1;; UnfocusTag) ## $1=tag - echo "$WMII_NORMCOLORS" $1 |a $WMII_DIR/lbar/$1;; + echo "$WMII_NORMCOLORS" $1 >> $WMII_DIR/lbar/$1;; UrgentTag) ## $1=tag $2=[Manager|Client] - echo "$WMII_URGENTCOLORS" $1 |a $WMII_DIR/lbar/$1;; + echo "$WMII_URGENTCOLORS" $1 >> $WMII_DIR/lbar/$1;; NotUrgentTag) ## $1=tag $2=[Manager|Client] - echo "$WMII_NORMCOLORS" $1 |a $WMII_DIR/lbar/$1;; + echo "$WMII_NORMCOLORS" $1 >> $WMII_DIR/lbar/$1;; ## LeftBar events (usually tag buttons) LeftBarMouseDown) ## $1=button $2=bar_item ;; LeftBarClick) ## $1=button $2=bar_item shift # ignore the button - echo view "$@" |a $WMII_DIR/ctl;; + echo view "$@" >> $WMII_DIR/ctl;; LeftMouseDND) ## $1=button $2=bar_item Event LeftBarClick "$@";; @@ -152,50 +152,49 @@ Key() { ## Moving around $MODKEY-$LEFT) ## Select the client to the left - echo select left |a $WMII_DIR/tag/sel/ctl;; + echo select left >> $WMII_DIR/tag/sel/ctl;; $MODKEY-$RIGHT) ## Select the client to the right - echo select right |a $WMII_DIR/tag/sel/ctl;; + echo select right >> $WMII_DIR/tag/sel/ctl;; $MODKEY-$UP) ## Select the client above - echo select up |a $WMII_DIR/tag/sel/ctl;; + echo select up >> $WMII_DIR/tag/sel/ctl;; $MODKEY-$DOWN) ## Select the client below - echo select down |a $WMII_DIR/tag/sel/ctl;; + echo select down >> $WMII_DIR/tag/sel/ctl;; $MODKEY-space) ## Toggle between floating and managed layers - echo select toggle |a $WMII_DIR/tag/sel/ctl;; + echo select toggle >> $WMII_DIR/tag/sel/ctl;; ## Moving clients around $MODKEY-Shift-$LEFT) ## Move selected client to the left - wmiir xwrite /tag/sel/ctl send sel left;; + echo send sel left >> $WMII_DIR/tag/sel/ctl;; $MODKEY-Shift-$RIGHT) ## Move selected client to the right - wmiir xwrite /tag/sel/ctl send sel right;; + echo send sel right >> $WMII_DIR/tag/sel/ctl;; $MODKEY-Shift-$UP) ## Move selected client up - wmiir xwrite /tag/sel/ctl send sel up;; + echo send sel up >> $WMII_DIR/tag/sel/ctl;; $MODKEY-Shift-$DOWN) ## Move selected client down - wmiir xwrite /tag/sel/ctl send sel down;; - + echo send sel down >> $WMII_DIR/tag/sel/ctl;; $MODKEY-Shift-space) ## Toggle selected client between floating and managed layers - wmiir xwrite /tag/sel/ctl send sel toggle;; + echo send sel toggle >> $WMII_DIR/tag/sel/ctl;; ## Moving through stacks $MODKEY-Control-$UP) ## Select the stack above - wmiir xwrite /tag/sel/ctl select up stack;; - $MODKEY-Control-$DOWN) # Select the stack below - wmiir xwrite /tag/sel/ctl select down stack;; + echo select up stack >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-Control-$DOWN) ## Select the stack below + echo select down stack >> $WMII_DIR/tag/sel/ctl;; ## Client actions $MODKEY-shift-1) ## Toggle selected client's fullsceen state - wmiir xwrite /client/sel/ctl Fullscreen toggle;; + echo Fullscreen toggle >> $WMII_DIR/client/sel/ctl;; $MODKEY-shift-0) ## Close client - wmiir xwrite /client/sel/ctl kill;; + echo kill >> $WMII_DIR/client/sel/ctl;; ## Changing column modes $MODKEY-d) ## Set column to default mode - wmiir xwrite /tag/sel/ctl colmode sel default-max;; + echo colmode sel default-max >> $WMII_DIR/tag/sel/ctl;; $MODKEY-s) ## Set column to stack mode - wmiir xwrite /tag/sel/ctl colmode sel stack-max;; + echo colmode sel stack-max >> $WMII_DIR/tag/sel/ctl;; $MODKEY-m) ## Set column to max mode - wmiir xwrite /tag/sel/ctl colmode sel stack+max;; + echo colmode sel stack+max >> $WMII_DIR/tag/sel/ctl;; ## Running programs $MODKEY-a) ## Open wmii actions menu @@ -205,44 +204,33 @@ Key() { $MODKEY-Return) ## Launch a terminal setsid x-terminal-emulator & ;; - ## Other - $MODKEY-Control-t) ## Toggle all other key bindings - case $(wmiir read /keys | wc -l | tr -d ' \t\n') in - 0|1) - echo -n "$Keys" | wmiir write /keys - wmiir xwrite /ctl grabmod $MODKEY;; - *) - wmiir xwrite /keys $MODKEY-Control-t - wmiir xwrite /ctl grabmod Mod3;; - esac;; - ## Tag actions $MODKEY-t) ## Change to another tag { tag=$(lstags | wimenu -h "${hist}.tags" -n 50) || return - wmiir xwrite /ctl view $tag + echo view $tag >> $WMII_DIR/ctl }& ;; $MODKEY-Shift-t) ## Retag the selected client sel=$(sed 1q $WMII_DIR/client/sel/ctl) { tag=$(lstags | wimenu -h "${hist}.tags" -n 50) || return - wmiir xwrite /client/$sel/tags "$tag" + echo "$tag" >> $WMII_DIR/client/$sel/tags }& ;; esac } ## End Key # WM Configuration -echo font xft:Monospace-8 |a $WMII_DIR/ctl -echo focuscolors $WMII_FOCUSCOLORS |a $WMII_DIR/ctl -echo normcolors $WMII_NORMCOLORS |a $WMII_DIR/ctl -echo grabmod $MODKEY |a $WMII_DIR/ctl -echo border 1 |a $WMII_DIR/ctl +echo font xft:Monospace-8 >> $WMII_DIR/ctl +echo focuscolors $WMII_FOCUSCOLORS >> $WMII_DIR/ctl +echo normcolors $WMII_NORMCOLORS >> $WMII_DIR/ctl +echo grabmod $MODKEY >> $WMII_DIR/ctl +echo border 1 >> $WMII_DIR/ctl xsetroot -solid "$WMII_BACKGROUND" & progsfile=$WMII_NAMESPACE/.proglist path_ls $PATH > $progsfile & -eval arg `scansection Key|cut -sf2` |a $WMII_DIR/keys +eval arg `scansection Key|cut -sf2` >> $WMII_DIR/keys # Clear the LBar find $WMII_DIR/lbar -type f -delete @@ -265,6 +253,6 @@ fi trap "Event Quit" EXIT # use wmiir so it doesn't look like an open file -wmiir read /event 2>/dev/null | while read event; do +wmiir read /event | while read event; do Event $event done |