[hackers] [wmii] Give wmiirc the ability to toggle keybindings, too.

From: Kris Maglione <jg_AT_suckless.org>
Date: Wed Mar 07 23:38:17 2007

changeset: 2010:28dedb0cf6eb
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Mar 07 17:35:20 2007 -0500
summary: Give wmiirc the ability to toggle keybindings, too.

diff -r a73826e9a6a2 -r 28dedb0cf6eb rc/wmiirc
--- a/rc/wmiirc Wed Mar 07 16:08:19 2007 -0500
+++ b/rc/wmiirc Wed Mar 07 17:35:20 2007 -0500
@@ -99,6 +99,15 @@ EOF
 EOF
         cat <<EOF
 # Key Bindings
+Key $MODKEY-Control-t
+ case \$(wmiir read /keys | wc -l | tr -d ' \t\n') in
+ 0|1)
+ echo -n \$Keys | tr ' ' '\012' | wmiir write /keys
+ wmiir xwrite /ctl grabmod $MODKEY;;
+ *)
+ wmiir xwrite /keys $MODKEY-Control-t
+ wmiir xwrite /ctl grabmod Mod3;;
+ esac
 Key $MODKEY-$LEFT
         wmiir xwrite /tag/sel/ctl select left
 Key $MODKEY-$RIGHT
@@ -225,5 +234,5 @@ while read event; do
 while read event; do
         set -- $event
         event=$1; shift
- Event_$event $@ # 2>/dev/null
+ Event_$event $@ 2>/dev/null
 done
\ No newline at end of file
Received on Wed Mar 07 2007 - 23:38:17 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:15 UTC