diff --git a/src/packages.scm b/src/packages.scm index 0f7df4b..5c6ec13 100644 --- a/src/packages.scm +++ b/src/packages.scm @@ -196,7 +196,7 @@ ;; *** main package ************************************************** (define-structure scsh-things - (export ((run &) :syntax)) + (export ((run &) :syntax) port->sexp-list) (open scsh)) (define-structure config @@ -215,7 +215,7 @@ get-manager-by-window create-new-manager root-wm-manage-window) - (open scheme list-lib scsh-things signals + (open scheme list-lib scsh-things signals extended-ports define-record-types threads xlib rendezvous rendezvous-channels diff --git a/src/root-manager.scm b/src/root-manager.scm index f613f55..0f7e928 100644 --- a/src/root-manager.scm +++ b/src/root-manager.scm @@ -319,8 +319,9 @@ #f (finite-complete (executables-in-path))))) (and exec (not (string=? exec "")) - ;; execute via sh -c to allow specifying arguments for the program - (& (sh -c ,exec))))) + (let* ((p (make-string-input-port exec)) + (parts (port->sexp-list p))) + (& ,parts))))) ((attach) (let* ((cm (root-wm:current-manager root-wm)) (windows-above (window-path (wm:dpy cm) (wm:window cm)))