[wiki] [sites] wiki updated
changeset: 728:3aee7121f3cc
tag: tip
user: Clement SIPIETER <c.sipieter_AT_gmail.com>
date: Sat Apr 23 22:27:10 2011 +0200
files: wmii.suckless.org/code_snippets/sh/index.md
description:
Add a wmii code snippets in wmii.suckless.org/code_snippets/sh/index.md
diff -r b814f6b4d133 -r 3aee7121f3cc wmii.suckless.org/code_snippets/sh/index.md
--- a/wmii.suckless.org/code_snippets/sh/index.md Fri Apr 22 16:00:37 2011 +0200
+++ b/wmii.suckless.org/code_snippets/sh/index.md Sat Apr 23 22:27:10 2011 +0200
_AT_@ -51,3 +51,39 @@
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
+
+
+
+
Received on Sat Apr 23 2011 - 22:24:31 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:31:44 CEST