.xbindkeysrc.scm

This commit is contained in:
Tom Willemsen 2012-02-23 18:18:51 +01:00
parent 3cb9146b91
commit bb52c25550

View file

@ -66,19 +66,33 @@
(close-port file)
tag))
(define (switch-tags)
"Switch to another tag"
(let* ((tags (get-tags))
(tag (choose-tag "Switch to tag" tags)))
(define (switch-to-tag tag)
(let ((tags (get-tags)))
(if (string? tag)
(begin
(if (not (member tag tags))
(system (string-append "herbstclient add " tag)))
(set! previous-tag current-tag)
(set! current-tag tag)
(run-command (string-append "herbstclient use " tag))))
(run-command (string-append "herbstclient use " tag))))))
(define (switch-tags)
"Switch to another tag"
(let* ((tags (get-tags))
(tag (choose-tag "Switch to tag" tags)))
(switch-to-tag tag)
(reset-main-binding)))
(define (switch-and-run)
"Ask for a command to run, switch to a tag with that name and run
the command."
(let* ((file (open-input-pipe
(string-append "dmenu_pick -p 'Run:' " dmenu-args)))
(prog (read-line file)))
(close-port file)
(switch-to-tag prog)
(run-command prog)))
(define (kill-tag)
"Kill a selected tag"
(let* ((tags (get-tags))