From a27f9b5bf0b0d69bd37b507b5b96f13cf6f4b99b Mon Sep 17 00:00:00 2001 From: Rutherther Date: Fri, 23 Aug 2024 18:22:57 +0200 Subject: [PATCH] feat: use herd with wlr-services in dwl startup command --- home/home-configuration.scm | 4 ++++ home/modules/ruther/home/dwl/scripts.scm | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/home/home-configuration.scm b/home/home-configuration.scm index 8503e67..0e14fd2 100644 --- a/home/home-configuration.scm +++ b/home/home-configuration.scm @@ -22,6 +22,7 @@ (ruther home dwl scripts) (ruther home themes) (ruther home services gtk) + (ruther home services wayland) (ruther home services kanshi)) (home-environment @@ -193,6 +194,9 @@ ("x-scheme-handler/https" . "librewolf.desktop") ("x-scheme-handler/unknown" . "librewolf.desktop"))))) + (service home-wayland-display-service-type) + (service home-wlr-services-service-type + '(kanshi)) (service home-kanshi-service-type (home-kanshi-configuration (config (kanshi-configuration diff --git a/home/modules/ruther/home/dwl/scripts.scm b/home/modules/ruther/home/dwl/scripts.scm index 2b22595..a145a11 100644 --- a/home/modules/ruther/home/dwl/scripts.scm +++ b/home/modules/ruther/home/dwl/scripts.scm @@ -3,6 +3,7 @@ #:use-module (guix records) #:use-module (guix packages) #:use-module (ruther packages wayland) + #:use-module (gnu packages admin) #:use-module (gnu packages glib) #:use-module (gnu packages xdisorg) #:use-module (gnu packages wm) @@ -197,11 +198,16 @@ (spawn (string-append #$blueman "/bin/blueman-applet") '("blueman-applet")) (spawn (string-append #$emacs-pgtk "/bin/emacs") '("emacs" "--daemon")) (spawn (string-append #$waybar "/bin/waybar") '("waybar")) - (guard (c ((invoke-error? c) - #$(invoke-wlr-randr fallback-output-config))) - #$(invoke-wlr-randr preferred-output-config)) - ;; TODO: how would I go about putting the correct paths inside of idle-rules withou env? + ; TODO: make a "target" instead, to start. + ; TODO: maybe shepherd should be taken out of its service? + (invoke + (string-append #$shepherd "/bin/herd") + "start" + "wlr-services" + (getenv "WAYLAND_DISPLAY")) + + ;; TODO: how would I go about putting the correct paths inside of idle-rules without PATH env? (set-path-environment-variable "PATH" (map (lambda (x) (string-append x "/bin")) -- 2.48.1