diff options
Diffstat (limited to 'sigils')
-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"))))) |