.xbindkeysrc.scm

This commit is contained in:
Tom Willemsen 2012-02-07 11:07:38 +01:00
parent 4c877f0c7b
commit 724ce012d4

View file

@ -2,9 +2,10 @@
(use-modules (ice-9 popen)
(ice-9 rdelim))
;;; Modkey
;;; Variables
(define modkey 'mod4)
(define dmenu-cmd "dmenu -b -nb '#000000' -nf '#15abc3' -sb '#e0c625' -sf '#000000'")
(define dmenu-cmd "dmenu")
(define dmenu-args "-b -nb '#000000' -nf '#15abc3' -sb '#e0c625' -sf '#000000'")
;;; Macros
(define-macro (cmd command)
@ -31,7 +32,7 @@
"Ask to choose a tag"
(let* ((file (open-input-pipe
(string-append "echo '" (string-join tags "\n")
"' | " dmenu-cmd " -p '" prompt ":'")))
"' | " dmenu-cmd " " dmenu-args " -p '" prompt ":'")))
(tag (read-line file)))
(close-port file)
tag))
@ -71,7 +72,7 @@
;;; Maps
(define (main-binding)
"First binding"
(xbindkey `(,modkey shift "1") "dmenu_run")
(xbindkey `(,modkey shift "1") (string-append "dmenu_run " dmenu-args))
(xbindkey-function `(,modkey x) X-functions)
(xbindkey-function `(,modkey w) W-functions)
(xbindkey-function `(,modkey s) S-functions)