diff options
author | Tom Willemsen | 2012-02-28 20:06:07 +0100 |
---|---|---|
committer | Tom Willemsen | 2012-02-28 20:06:07 +0100 |
commit | 8f46bf4cbb87bfcae1b2ead30fda70d2e1fcc5ea (patch) | |
tree | 96a8565dbd92af171d7b2cd4a13d0322a39c7f15 /.xbindkeysrc.scm | |
parent | fd2fd41a8e93778ded2a1512285bf56d0fb67b1b (diff) | |
download | dotfiles-8f46bf4cbb87bfcae1b2ead30fda70d2e1fcc5ea.tar.gz dotfiles-8f46bf4cbb87bfcae1b2ead30fda70d2e1fcc5ea.zip |
.xbindkeysrc.scm
Diffstat (limited to '.xbindkeysrc.scm')
-rw-r--r-- | .xbindkeysrc.scm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/.xbindkeysrc.scm b/.xbindkeysrc.scm index 7709acd..22aa5b7 100644 --- a/.xbindkeysrc.scm +++ b/.xbindkeysrc.scm @@ -138,13 +138,11 @@ the command." (close-pipe dzen-pipe) (set! dzen-pipe '()))) -(define (toggle-touchpad) - (let* ((pipe (open-input-pipe "synclient | grep TouchpadOff")) - (state (car (last-pair (string-split (read-line pipe) #\ ))))) - (close-port pipe) - (if (equal? state "0") - (system "synclient TouchpadOff=1; xte 'mousemove 1500 1500'") - (system "synclient TouchpadOff=0")))) +(define (kill-mouse) + (system "synclient TouchpadOff=1; xte 'mousemove 1500 1500'")) + +(define (revive-mouse) + (system "synclient TouchpadOff=0")) ;;;_ Maps (define (main-binding) @@ -169,6 +167,8 @@ the command." (xbindkey `(,modkey n) "herbstclient focus down") (xbindkey `(,modkey p) "herbstclient focus up") (xbindkey `(,modkey f) "herbstclient focus right") + (xbindkey-function '(XF86TouchpadOff) kill-mouse) + (xbindkey-function '(XF86TouchpadOn) revive-mouse) (xbindkey-function `(,modkey g) reset-main-binding)) (create-map X-function-map |