dotfiles/herbstluftwm/usr/share/scsh/herbstluft.scm

15 lines
397 B
Scheme
Raw Permalink Normal View History

(define-structure herbstluft (export hc hc-get-attr)
(open scheme-with-scsh
(subset srfi-13 (string-trim-both)))
(begin
(define-syntax hc
(syntax-rules ()
((_ a ...)
(herbstclient `(a ...)))))
(define (herbstclient args)
(run (herbstclient ,@args)))
(define (hc-get-attr arg)
(string-trim-both (run/string (herbstclient attr ,arg))))))