.xbindkeysrc.scm

This commit is contained in:
Tom Willemsen 2012-02-28 20:06:07 +01:00
parent fd2fd41a8e
commit 8f46bf4cbb

View file

@ -138,13 +138,11 @@ the command."
(close-pipe dzen-pipe) (close-pipe dzen-pipe)
(set! dzen-pipe '()))) (set! dzen-pipe '())))
(define (toggle-touchpad) (define (kill-mouse)
(let* ((pipe (open-input-pipe "synclient | grep TouchpadOff")) (system "synclient TouchpadOff=1; xte 'mousemove 1500 1500'"))
(state (car (last-pair (string-split (read-line pipe) #\ )))))
(close-port pipe) (define (revive-mouse)
(if (equal? state "0") (system "synclient TouchpadOff=0"))
(system "synclient TouchpadOff=1; xte 'mousemove 1500 1500'")
(system "synclient TouchpadOff=0"))))
;;;_ Maps ;;;_ Maps
(define (main-binding) (define (main-binding)
@ -169,6 +167,8 @@ the command."
(xbindkey `(,modkey n) "herbstclient focus down") (xbindkey `(,modkey n) "herbstclient focus down")
(xbindkey `(,modkey p) "herbstclient focus up") (xbindkey `(,modkey p) "herbstclient focus up")
(xbindkey `(,modkey f) "herbstclient focus right") (xbindkey `(,modkey f) "herbstclient focus right")
(xbindkey-function '(XF86TouchpadOff) kill-mouse)
(xbindkey-function '(XF86TouchpadOn) revive-mouse)
(xbindkey-function `(,modkey g) reset-main-binding)) (xbindkey-function `(,modkey g) reset-main-binding))
(create-map X-function-map (create-map X-function-map