From c331ae7a51a964338aea25a79be0f84157f4b8b8 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Fri, 10 Feb 2006 16:10:21 +0100 Subject: [PATCH] small change to wmiirc --- rc/wmiirc | 92 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/rc/wmiirc b/rc/wmiirc index c4807279..9938c4d4 100755 --- a/rc/wmiirc +++ b/rc/wmiirc @@ -73,50 +73,52 @@ extern xterm -rv& status & wmiir read /event | \ -while(key=`{read}) { - xwrite /bar/2/data $key - switch($key) { - case $MODKEY-Control-c - xwrite /sel/sel/sel/ctl kill - case $MODKEY-Control-w,y - wmiirc & - case $MODKEY-Control-q,y - xwrite /ctl quit - case $MODKEY-t - extern xterm -rv & - case $MODKEY-d - xwrite /sel/sel/sel/ctl detach - case $MODKEY-a - xwrite /ctl attach - case $MODKEY-Shift-a - xwrite /ctl detached - case $MODKEY-n - wmiir read /sel/new >/dev/null >[2=1] - case $MODKEY-m - xwrite /sel/sel/sel/ctl max - case $MODKEY-Return - xwrite /sel/sel/ctl 'swap east' - case $MODKEY-Shift-Return - xwrite /sel/sel/ctl 'swap west' - case $MODKEY-Control-y - wmiir read /new >/dev/null >[2=1] - case $MODKEY-h - xwrite /sel/ctl 'select next' - case $MODKEY-l - xwrite /sel/ctl 'select prev' - case $MODKEY-Tab - xwrite /sel/sel/ctl 'select next' - case $MODKEY-j - xwrite /sel/sel/ctl 'select next' - case $MODKEY-k - xwrite /sel/sel/ctl 'select prev' - case $MODKEY-Shift-h - xwrite /ctl 'select prev' - case $MODKEY-Shift-l - xwrite /ctl 'select next' - case $MODKEY-Shift-p - xwrite /ctl pager - case $MODKEY-Shift-[1-9] - xwrite /ctl 'select '^`{echo $k|sed 's/.*-//g'} +while(event=`{read}) { + xwrite /bar/2/data $"event + if(~ $event(1) K) { # key press + switch($event(2)) { + case $MODKEY-Control-c + xwrite /sel/sel/sel/ctl kill + case $MODKEY-Control-w,y + wmiirc & + case $MODKEY-Control-q,y + xwrite /ctl quit + case $MODKEY-t + extern xterm -rv & + case $MODKEY-d + xwrite /sel/sel/sel/ctl detach + case $MODKEY-a + xwrite /ctl attach + case $MODKEY-Shift-a + xwrite /ctl detached + case $MODKEY-n + wmiir read /sel/new >/dev/null >[2=1] + case $MODKEY-m + xwrite /sel/sel/sel/ctl max + case $MODKEY-Return + xwrite /sel/sel/ctl 'swap east' + case $MODKEY-Shift-Return + xwrite /sel/sel/ctl 'swap west' + case $MODKEY-Control-y + wmiir read /new >/dev/null >[2=1] + case $MODKEY-h + xwrite /sel/ctl 'select next' + case $MODKEY-l + xwrite /sel/ctl 'select prev' + case $MODKEY-Tab + xwrite /sel/sel/ctl 'select next' + case $MODKEY-j + xwrite /sel/sel/ctl 'select next' + case $MODKEY-k + xwrite /sel/sel/ctl 'select prev' + case $MODKEY-Shift-h + xwrite /ctl 'select prev' + case $MODKEY-Shift-l + xwrite /ctl 'select next' + case $MODKEY-Shift-p + xwrite /ctl pager + case $MODKEY-Shift-[1-9] + xwrite /ctl 'select '^`{echo $k|sed 's/.*-//g'} + } } }