diff --git a/home-configuration.scm b/home-configuration.scm index b961f84..c7eed63 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -41,10 +41,12 @@ (scheme-file "sway-menu.scm" #~(begin - (use-modules (ice-9 receive) + (use-modules (ice-9 popen) + (ice-9 receive) (ice-9 rdelim) (ice-9 ftw) - (guix build utils)) + (guix build utils) + (srfi srfi-1)) (define (directory->files dir) (define (executable-file? f) @@ -62,15 +64,15 @@ "/.guix-home/profile/bin")) (wmenu #$(file-append wmenu "/bin/wmenu")) (swaymsg #$(file-append sway "/bin/swaymsg"))) - (receive (from to pid) - ((@@ (ice-9 popen) open-process) OPEN_BOTH wmenu) + (receive (from to pids) + (pipeline `((,wmenu))) (for-each (lambda (c) (format to "~a~%" c)) (directory->files path)) (close to) (let ((choice (read-line from))) (close from) - (waitpid pid) + (waitpid (first pids)) (execl swaymsg swaymsg "exec" ;(string-append path "/" choice) choice)))))))