diff options
author | Sisiutl <sisiutl@egregore.fun> | 2024-11-23 14:18:27 +0100 |
---|---|---|
committer | Sisiutl <sisiutl@egregore.fun> | 2024-11-23 15:35:11 +0100 |
commit | c7e48788206ec10d44d397ef85dd84b4e4e6f80b (patch) | |
tree | 868034f1ad3ed50aa8fae30cf1b0436543d9171d | |
parent | 72c86899ca9e20b924a4a3a0047295eb167da81f (diff) |
kanshi service wayland
-rw-r--r-- | sigils/home/services/wayland.scm (renamed from sigils/services/wayland.scm) | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sigils/services/wayland.scm b/sigils/home/services/wayland.scm index 3f6609a..379e2e3 100644 --- a/sigils/services/wayland.scm +++ b/sigils/home/services/wayland.scm @@ -20,7 +20,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with rde. If not, see <http://www.gnu.org/licenses/>. -(define-module (sigils services wayland) +(define-module (sigils home services wayland) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu packages wm) @@ -29,8 +29,10 @@ #:use-module (guix gexp) #:use-module (guix diagnostics) #:use-module (guix ui) + #:use-module (sigils home services desktop) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (srfi srfi-43) #:use-module (ice-9 match) @@ -122,9 +124,6 @@ where each expression is also a list, but provided value is:\n ~a") e))) )) (kanshi (file-like kanshi) "kanshi package to use.") - (display - (string "wayland-1") - "Wayland display") (config (sway-config `()) @@ -149,21 +148,21 @@ The example configuration: (serialize-sway-config (home-kanshi-configuration-config config)))))) (define (home-kanshi-shepherd-service config) - (let ((kanshi (home-kanshi-configuration-kanshi config)) - (display (home-kanshi-configuration-display config))) + (let ((kanshi (home-kanshi-configuration-kanshi config))) (list (shepherd-service (provision '(kanshi)) - (requirement '(dbus)) - (respawn-delay 1) + (requirement '(wayland-display)) (start #~(make-forkexec-constructor (list #$(file-append kanshi "/bin/kanshi")) #:log-file (string-append (getenv "XDG_STATE_HOME") "/log" "/kanshi.log") #:environment-variables - (cons (string-append "WAYLAND_DISPLAY=" #$display) - (default-environment-variables)))) + (cons (string-append "WAYLAND_DISPLAY=" + (getenv "WAYLAND_DISPLAY")) + (remove (cut string-prefix? "WAYLAND_DISPLAY=" <>) + (default-environment-variables))))) (stop #~(make-kill-destructor)) (documentation "Run Kanshi"))))) |