sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit d12aab94e74adc4973c004ec767b27ea43879674
parent e476b0af133a0d0829b481c4f6452653d94edb36
Author: Clement SIPIETER <c.sipieter@gmail.com>
Date:   Sat, 23 Apr 2011 22:27:10 +0200

Add a wmii code snippets in wmii.suckless.org/code_snippets/sh/index.md
Diffstat:
Mwmii.suckless.org/code_snippets/sh/index.md | 36++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+), 0 deletions(-)

diff --git a/wmii.suckless.org/code_snippets/sh/index.md b/wmii.suckless.org/code_snippets/sh/index.md @@ -51,3 +51,39 @@ enters resize mode, Escape exits it. wi_eventloop ) & +Add a name to views 0..9 +------------------------ + +Add this code to the beginning of your wmiirc: + + VIEW_NAME='[0] [1] [2]Chat [3]Dev [4]Web [5] [6] [7] [8] [9]' + getviewname(){ + i=$(($i+1)) + echo $VIEW_NAME | awk "{print $`echo $i`}"; + } + +and replace this: + + for i in 0 1 2 3 4 5 6 7 8 9; do + cat <<! + Key $MODKEY-$i # Move to the numbered view + wmiir xwrite /ctl view "$i" + Key $MODKEY-Shift-$i # Retag selected client with the numbered tag + wmiir xwrite /client/sel/tags "$i" + ! + done + +by: + + for i in 0 1 2 3 4 5 6 7 8 9; do + cat <<! + Key $MODKEY-$i # Move to the numbered view + wmiir xwrite /ctl view "`getviewname $i`" + Key $MODKEY-Shift-$i # Retag selected client with the numbered tag + wmiir xwrite /client/sel/tags "`getviewname $i`" + ! + done + + + +