add exec function to readme

This commit is contained in:
Almarhoon Ibraheem 2024-06-18 21:00:31 +03:00
parent ae09bf465e
commit f8c156e734

View file

@ -60,6 +60,12 @@ You can assign keybindings that execute Guile code! Obviously, running shell com
;; requires configuring commander-path, refer to the FIXME note in keybindings.scm for more details.
;; refer to modules/general.scm for more about how this is done.
;; define leader keymap
(define (exec command)
"execute given shell command"
(format #t "running: ~a\n" command)
(system command))
(general-define-keys
#:prefix "s-Space" #:wk "Leader"
`("o" (exec "rofi -show drun"))