This commit is contained in:
Tom Willemsen 2012-02-07 20:07:39 +01:00
parent 5a87ca44b8
commit 5aa3ec23c5

View file

@ -8,6 +8,8 @@
(define dmenu-cmd "dmenu") (define dmenu-cmd "dmenu")
(define dmenu-args (define dmenu-args
(string-append "-b -nb '#000000' -nf '#15abc3' -sb '#e0c625' -sf '#000000' -fn '" font "'")) (string-append "-b -nb '#000000' -nf '#15abc3' -sb '#e0c625' -sf '#000000' -fn '" font "'"))
(define dzen-cmd "dzen2")
(define dzen-args (string-append " -fn '" font "' -x 5 -y 5 -bg '#000000' -fg '#15abc3'"))
(define dzen-pipe '()) (define dzen-pipe '())
;;; Macros ;;; Macros
@ -26,6 +28,7 @@
(grab-all-keys)) (grab-all-keys))
(define (get-tags) (define (get-tags)
"Get a list of tags"
(let* ((file (open-input-pipe (let* ((file (open-input-pipe
"TAGS=( $(herbstclient tag_status 0 | tr \":\\!.+#\" \" \") ); echo ${TAGS[@]}")) "TAGS=( $(herbstclient tag_status 0 | tr \":\\!.+#\" \" \") ); echo ${TAGS[@]}"))
(tags (string-split (read-line file) #\ ))) (tags (string-split (read-line file) #\ )))
@ -84,8 +87,8 @@
(define (gui-print text) (define (gui-print text)
(let ((width (+ (text-width font text) 10))) (let ((width (+ (text-width font text) 10)))
(set! dzen-pipe (open-output-pipe (set! dzen-pipe (open-output-pipe
(string-append "dzen2 -w " (number->string width) (string-append dzen-cmd " -w " (number->string width)
" -fn '" font "' -x 5 -y 5 -bg '#000000' -fg '#15abc3'")))) " " dzen-args))))
(display text dzen-pipe) (display text dzen-pipe)
(newline dzen-pipe)) (newline dzen-pipe))