Re: [wmii] rc0: 20060427-rc0-tschernobyl, wmiirc shortcuts patch

From: Suraj N. Kurapati <skurapat_AT_ucsc.edu>
Date: Fri, 28 Apr 2006 13:38:35 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please see the attached patch for rc/wmiirc. I think it would make
shortcuts easier to configure and remember.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEUn1LmV9O7RYnKMcRAndBAJoD3WODiI70VEJkgh3vepdGx909RgCgnawe
ngtAFdAP+722eOTOfb56n7c=
=YZoH
-----END PGP SIGNATURE-----

--- wmiirc.orig 2006-04-28 13:14:14.000000000 -0700
+++ wmiirc 2006-04-28 13:32:20.000000000 -0700
@@ -16,6 +16,13 @@
 LEFT=h
 RIGHT=l
 
+SELECT=${MODKEY}-
+SEND=${SELECT}Shift-
+SWAP=${SELECT}Control-
+LAYOUT=${SELECT}
+MENU=${SELECT}
+PROG=${SELECT}
+
 WMII_FONT='fixed'
 WMII_SELCOLORS='#ffffff #285577 #4c7899'
 WMII_NORMCOLORS='#222222 #eeeeee #666666'
@@ -55,48 +62,48 @@
 # SHORTCUTS
 xwrite /def/grabmod $MODKEY
 wmiir write /def/keys <<EOF
-$MODKEY-$LEFT
-$MODKEY-$RIGHT
-$MODKEY-$DOWN
-$MODKEY-$UP
-$MODKEY-space
-$MODKEY-d
-$MODKEY-f
-$MODKEY-s
-$MODKEY-m
-$MODKEY-a
-$MODKEY-p
-$MODKEY-t
-$MODKEY-0
-$MODKEY-1
-$MODKEY-2
-$MODKEY-3
-$MODKEY-4
-$MODKEY-5
-$MODKEY-6
-$MODKEY-7
-$MODKEY-8
-$MODKEY-9
-$MODKEY-Return
-$MODKEY-Shift-$LEFT
-$MODKEY-Shift-$RIGHT
-$MODKEY-Shift-space
-$MODKEY-Shift-c
-$MODKEY-Shift-t
-$MODKEY-Shift-0
-$MODKEY-Shift-1
-$MODKEY-Shift-2
-$MODKEY-Shift-3
-$MODKEY-Shift-4
-$MODKEY-Shift-5
-$MODKEY-Shift-6
-$MODKEY-Shift-7
-$MODKEY-Shift-8
-$MODKEY-Shift-9
-$MODKEY-Control-$LEFT
-$MODKEY-Control-$RIGHT
-$MODKEY-Control-$DOWN
-$MODKEY-Control-$UP
+${SELECT}${LEFT}
+${SELECT}${RIGHT}
+${SELECT}${DOWN}
+${SELECT}${UP}
+${SELECT}space
+${LAYOUT}d
+${LAYOUT}f
+${LAYOUT}s
+${LAYOUT}m
+${MENU}a
+${MENU}p
+${MENU}t
+${SELECT}0
+${SELECT}1
+${SELECT}2
+${SELECT}3
+${SELECT}4
+${SELECT}5
+${SELECT}6
+${SELECT}7
+${SELECT}8
+${SELECT}9
+${PROG}Return
+${SEND}${LEFT}
+${SEND}${RIGHT}
+${SEND}space
+${SEND}c
+${SEND}t
+${SEND}0
+${SEND}1
+${SEND}2
+${SEND}3
+${SEND}4
+${SEND}5
+${SEND}6
+${SEND}7
+${SEND}8
+${SEND}9
+${SWAP}${LEFT}
+${SWAP}${RIGHT}
+${SWAP}${DOWN}
+${SWAP}${UP}
 EOF
 
 # EVENT LOOP
@@ -115,53 +122,53 @@
                 xwrite /ctl view "$1";;
         Key)
                 case "$1" in
- $MODKEY-$LEFT)
+ ${SELECT}${LEFT})
                         xwrite /view/ctl select prev;;
- $MODKEY-$RIGHT)
+ ${SELECT}${RIGHT})
                         xwrite /view/ctl select next;;
- $MODKEY-$DOWN)
+ ${SELECT}${DOWN})
                         xwrite /view/sel/ctl select next;;
- $MODKEY-$UP)
+ ${SELECT}${UP})
                         xwrite /view/sel/ctl select prev;;
- $MODKEY-space)
+ ${SELECT}space)
                         xwrite /view/ctl select toggle;;
- $MODKEY-d)
+ ${LAYOUT}d)
                         xwrite /view/sel/mode default;;
- $MODKEY-s)
+ ${LAYOUT}s)
                         xwrite /view/sel/mode stack;;
- $MODKEY-m)
+ ${LAYOUT}m)
                         xwrite /view/sel/mode max;;
- $MODKEY-f)
+ ${LAYOUT}f)
                         xwrite /view/0/sel/geom 0 0 east south;;
- $MODKEY-a)
+ ${MENU}a)
                         PATH=$HOME/.wmii-3:CONFPREFIX/wmii-3:$PATH `proglist CONFPREFIX/wmii-3 $HOME/.wmii-3 | wmiimenu` &;;
- $MODKEY-p)
+ ${MENU}p)
                         `wmiimenu <$PROGS_FILE` &;;
- $MODKEY-t)
+ ${MENU}t)
                         xwrite /ctl view "`wmiir read /tags | wmiimenu`" &;;
- $MODKEY-[0-9])
+ ${SELECT}[0-9])
                         xwrite /ctl view `echo $1 | sed 's/.*-//'`;;
- $MODKEY-Return)
+ ${PROG}Return)
                         xterm &;;
- $MODKEY-Shift-$LEFT)
+ ${SEND}${LEFT})
                         xwrite /view/sel/sel/ctl sendto prev;;
- $MODKEY-Shift-$RIGHT)
+ ${SEND}${RIGHT})
                         xwrite /view/sel/sel/ctl sendto next;;
- $MODKEY-Shift-space)
+ ${SEND}space)
                         xwrite /view/sel/sel/ctl sendto toggle;;
- $MODKEY-Shift-c)
+ ${SEND}c)
                         xwrite /view/sel/sel/ctl kill;;
- $MODKEY-Shift-t)
+ ${SEND}t)
                         xwrite /view/sel/sel/tags "`wmiir read /tags | wmiimenu`" &;;
- $MODKEY-Shift-[0-9])
+ ${SEND}[0-9])
                         xwrite /view/sel/sel/tags `echo $1 | sed 's/.*-//'`;;
- $MODKEY-Control-$LEFT)
+ ${SWAP}${LEFT})
                         xwrite /view/sel/sel/ctl swap prev;;
- $MODKEY-Control-$RIGHT)
+ ${SWAP}${RIGHT})
                         xwrite /view/sel/sel/ctl swap next;;
- $MODKEY-Control-$DOWN)
+ ${SWAP}${DOWN})
                         xwrite /view/sel/sel/ctl swap down;;
- $MODKEY-Control-$UP)
+ ${SWAP}${UP})
                         xwrite /view/sel/sel/ctl swap up;;
                 esac;;
         esac
Received on Fri Apr 28 2006 - 22:38:47 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:04:01 UTC