.xbindkeysrc.scm
This commit is contained in:
parent
3cb9146b91
commit
bb52c25550
1 changed files with 19 additions and 5 deletions
|
@ -66,19 +66,33 @@
|
||||||
(close-port file)
|
(close-port file)
|
||||||
tag))
|
tag))
|
||||||
|
|
||||||
(define (switch-tags)
|
(define (switch-to-tag tag)
|
||||||
"Switch to another tag"
|
(let ((tags (get-tags)))
|
||||||
(let* ((tags (get-tags))
|
|
||||||
(tag (choose-tag "Switch to tag" tags)))
|
|
||||||
(if (string? tag)
|
(if (string? tag)
|
||||||
(begin
|
(begin
|
||||||
(if (not (member tag tags))
|
(if (not (member tag tags))
|
||||||
(system (string-append "herbstclient add " tag)))
|
(system (string-append "herbstclient add " tag)))
|
||||||
(set! previous-tag current-tag)
|
(set! previous-tag current-tag)
|
||||||
(set! current-tag 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)))
|
(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)
|
(define (kill-tag)
|
||||||
"Kill a selected tag"
|
"Kill a selected tag"
|
||||||
(let* ((tags (get-tags))
|
(let* ((tags (get-tags))
|
||||||
|
|
Loading…
Reference in a new issue