diff options
Diffstat (limited to 'oni/home/services/stumpwm.scm')
| -rw-r--r-- | oni/home/services/stumpwm.scm | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/oni/home/services/stumpwm.scm b/oni/home/services/stumpwm.scm index 3b60a03..56d1ae3 100644 --- a/oni/home/services/stumpwm.scm +++ b/oni/home/services/stumpwm.scm @@ -8,6 +8,8 @@ serialize-text-config)) #:use-module ((gnu packages lisp) #:select (sbcl)) + #:use-module ((gnu packages music) + #:select (playerctl)) #:use-module ((gnu packages wm) #:select (stumpwm stumpish @@ -38,7 +40,10 @@ home-stumpwm-gaps-configuration home-stumpwm-stumptray-service-type - home-stumpwm-stumptray-configuration)) + home-stumpwm-stumptray-configuration + + home-stumpwm-playerctl-service-type + home-stumpwm-playerctl-configuration)) (define (serialize-integer field value) "") @@ -193,3 +198,40 @@ (compose identity) (default-value (home-stumpwm-stumptray-configuration)) (description "Install and configure stumpwm-stumptray."))) + +(define-configuration/no-serialization home-stumpwm-playerctl-configuration + (package + (package playerctl) + "Package to use for setting playerctl in stumpwm.") + (configurations + (text-config '()) + "Configuration for playerctl in stumpwm.")) + +(define (add-stumpwm-playerctl-packages config) + (list (home-stumpwm-playerctl-configuration-package config))) + +(define (add-stumpwm-playerctl config) + (home-stumpwm-extension + (configurations + (append + (list + (mixed-text-file + "playerctl.lisp" + "(defvar *playerctl-program* \"" + (home-stumpwm-playerctl-configuration-package config) + "/bin/playerctl\")\n")) + (home-stumpwm-playerctl-configuration-configurations config))))) + +(define home-stumpwm-playerctl-service-type + (service-type + (name 'home-stumpwm-playerctl) + (extensions + (list (service-extension + home-stumpwm-service-type + add-stumpwm-playerctl) + (service-extension + home-profile-service-type + add-stumpwm-playerctl-packages))) + (compose identity) + (default-value (home-stumpwm-playerctl-configuration)) + (description "Install and configure playerctl in stumpwm."))) |
