diff options
| author | 2025-04-22 10:30:29 -0700 | |
|---|---|---|
| committer | 2025-04-22 10:30:29 -0700 | |
| commit | 6ee7e001ef6d99681418d71baf01f85a1c387811 (patch) | |
| tree | ccf00534ea5e212c5994b48ba9e0026fc0a66f0c /oni/home | |
| parent | d5e63c06a024aabcb151e9e5a1f0ad7e5c2b140d (diff) | |
| download | new-dotfiles-6ee7e001ef6d99681418d71baf01f85a1c387811.tar.gz new-dotfiles-6ee7e001ef6d99681418d71baf01f85a1c387811.zip | |
stumpwm: Make screen locking program configurable
On my work laptop this needs to just be ‘/usr/bin/i3lock’ because the libraries
in Guix are incompatible with those on Pop!_OS.
Diffstat (limited to 'oni/home')
| -rw-r--r-- | oni/home/config/pop-os.scm | 1 | ||||
| -rw-r--r-- | oni/home/services/stumpwm.scm | 15 | ||||
| -rw-r--r-- | oni/home/services/stumpwm/config | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/oni/home/config/pop-os.scm b/oni/home/config/pop-os.scm index 62837ca..b5d30f9 100644 --- a/oni/home/config/pop-os.scm +++ b/oni/home/config/pop-os.scm @@ -179,6 +179,7 @@ (service home-stumpwm-service-type (home-stumpwm-configuration (package stumpwm+swank) + (locker-program "/usr/bin/i3lock") (configurations (list (local-file "../services/stumpwm/config") (local-file "../services/stumpwm/pop-os-config.lisp"))))) diff --git a/oni/home/services/stumpwm.scm b/oni/home/services/stumpwm.scm index 9bde255..eabc944 100644 --- a/oni/home/services/stumpwm.scm +++ b/oni/home/services/stumpwm.scm @@ -16,7 +16,8 @@ #:select (stumpwm stumpish sbcl-stumpwm-swm-gaps - sbcl-stumpwm-stumptray)) + sbcl-stumpwm-stumptray + i3lock)) #:use-module ((gnu home services) #:select (service-type service-extension @@ -53,6 +54,12 @@ (define (serialize-integer field value) "") +(define (serialize-string-or-package field value) "") + +(define (string-or-package? obj) + (or (string? obj) + (package? obj))) + (define-configuration/no-serialization home-stumpwm-extension (configurations (text-config '()) @@ -70,7 +77,10 @@ "The number of seconds to wait for stumpwm to start up.") (stumpish-package (package stumpish) - "Package to use for setting Stumpish")) + "Package to use for setting Stumpish") + (locker-program + (string-or-package i3lock) + "Package to use for locking the screen")) (define (add-stumpwm-packages config) (append (list sbcl @@ -88,6 +98,7 @@ `(("stumpwm/config" ,(mixed-text-file "config" + "(setq *locker-program* \"" (home-stumpwm-configuration-locker-program config) "\")\n" (serialize-text-config config (home-stumpwm-configuration-configurations config)))))) (define (reload-stumpwm-config-gexp _) diff --git a/oni/home/services/stumpwm/config b/oni/home/services/stumpwm/config index 3f44f74..12c22bc 100644 --- a/oni/home/services/stumpwm/config +++ b/oni/home/services/stumpwm/config @@ -25,7 +25,7 @@ Run `*screen-locking-hook*' before locking it and run `*screen-unlocked-hook*' after it has been unlocked." (run-hook *screen-locking-hook*) (sb-ext:run-program - *shell-program* '("-c" "i3lock --nofork --color=000000") + *shell-program* `("-c" ,(format nil "~a --nofork --color=000000" *locker-program*)) :wait nil :status-hook #'run-screen-unlocked-hook)) |
