summaryrefslogtreecommitdiff
path: root/sigils/home/services/hyprland.scm
diff options
context:
space:
mode:
authorSisiutl <sisiutl@egregore.fun>2024-11-07 21:23:27 +0100
committerSisiutl <sisiutl@egregore.fun>2024-11-07 21:23:27 +0100
commit0a616d8ed652683b95bcb9ed292065b2c4fb1f2a (patch)
tree7a78c8b23caf6cd90834f4dfd04f9621cb603e93 /sigils/home/services/hyprland.scm
parent57d47ad4f05cb6cdc4c3a21b08199ebf5098ac18 (diff)
add plugin infrastructure for hyprland
Diffstat (limited to 'sigils/home/services/hyprland.scm')
-rw-r--r--sigils/home/services/hyprland.scm20
1 files changed, 14 insertions, 6 deletions
diff --git a/sigils/home/services/hyprland.scm b/sigils/home/services/hyprland.scm
index aeb22b3..696a88e 100644
--- a/sigils/home/services/hyprland.scm
+++ b/sigils/home/services/hyprland.scm
@@ -1,5 +1,6 @@
(define-module (sigils home services hyprland)
#:use-module (guix gexp)
+ #:use-module (guix packages)
#:use-module (gnu home services)
#:use-module (gnu services configuration)
#:use-module (sigils packages hyprland)
@@ -174,17 +175,24 @@
(windowrulev2 "suppressevent maximize" class:.*)
(windowrulev2 nofocus class:^$ title:^$ xwayland:1 floating:1 fullscreen:0 pinned:0)))
-(define-configuration home-hyprland-configuration
+(define-configuration/no-serialization home-hyprland-configuration
+ (plugins
+ (list-of-packages '())
+ "Additional plugins to load with Hyprland.")
(config
(hypr-config %default-hyprland-config)
"Hyprland configuration"))
-(define (add-hyprland-configuration config)
+(define (hyprland-configuration->file config)
`(("hypr/hyprland.conf"
- ,(mixed-text-file
+ ,(apply
+ mixed-text-file
"hyprland-config"
- (serialize-hypr-config
- (home-hyprland-configuration-config config))))))
+ `(,@(append-map (lambda (plugin)
+ `("plugin = " ,plugin "/lib/lib" ,(package-name plugin) ".so\n"))
+ (home-hyprland-configuration-plugins config))
+ ,(serialize-hypr-config
+ (home-hyprland-configuration-config config)))))))
(define hyprctl-reload-gexp
#~(begin
@@ -196,7 +204,7 @@
(extensions
(list (service-extension
home-xdg-configuration-files-service-type
- add-hyprland-configuration)
+ hyprland-configuration->file)
(service-extension
home-activation-service-type
(const hyprctl-reload-gexp))))