1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-21 17:59:39 +01:00

hyprland: plugins use hyprctl from path (#6801)

This commit is contained in:
Amadej Kastelic 2025-04-11 14:59:55 +02:00 committed by GitHub
parent da624eaad0
commit e15c4203ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 6 deletions

View file

@ -291,9 +291,8 @@ in
let let
mkEntry = mkEntry =
entry: if lib.types.package.check entry then "${entry}/lib/lib${entry.pname}.so" else entry; entry: if lib.types.package.check entry then "${entry}/lib/lib${entry.pname}.so" else entry;
hyprctl = "${cfg.finalPackage}/bin/hyprctl";
in in
map (p: "${hyprctl} plugin load ${mkEntry p}") cfg.plugins; map (p: "hyprctl plugin load ${mkEntry p}") cfg.plugins;
}; };
inherit (cfg) importantPrefixes; inherit (cfg) importantPrefixes;
}; };

View file

@ -1,6 +1,6 @@
exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
exec-once=/nix/store/00000000000000000000000000000000-hyprland/bin/hyprctl plugin load /path/to/plugin1 exec-once=hyprctl plugin load /path/to/plugin1
exec-once=/nix/store/00000000000000000000000000000000-hyprland/bin/hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so exec-once=hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so
$mod=SUPER $mod=SUPER
bezier=smoothOut, 0.36, 0, 0.66, -0.56 bezier=smoothOut, 0.36, 0, 0.66, -0.56
bezier=smoothIn, 0.25, 1, 0.5, 1 bezier=smoothIn, 0.25, 1, 0.5, 1

View file

@ -0,0 +1,7 @@
exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
exec-once=hyprctl plugin load /path/to/plugin1
exec-once=hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so
cursor {
enable_hyprcursor=true
sync_gsettings_theme=true
}

View file

@ -1,7 +1,13 @@
{ config, ... }:
{ {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
package = null; package = null;
plugins = [
"/path/to/plugin1"
(config.lib.test.mkStubPackage { name = "foo"; })
];
settings = { settings = {
cursor = { cursor = {
enable_hyprcursor = true; enable_hyprcursor = true;
@ -29,5 +35,8 @@
nmt.script = '' nmt.script = ''
config=home-files/.config/hypr/hyprland.conf config=home-files/.config/hypr/hyprland.conf
assertFileExists "$config" assertFileExists "$config"
normalizedConfig=$(normalizeStorePaths "$config")
assertFileContent "$normalizedConfig" ${./null-package-config.conf}
''; '';
} }

View file

@ -1,6 +1,6 @@
exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
exec-once=/nix/store/00000000000000000000000000000000-hyprland/bin/hyprctl plugin load /path/to/plugin1 exec-once=hyprctl plugin load /path/to/plugin1
exec-once=/nix/store/00000000000000000000000000000000-hyprland/bin/hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so exec-once=hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so
$mod=SUPER $mod=SUPER
bezier=smoothOut, 0.36, 0, 0.66, -0.56 bezier=smoothOut, 0.36, 0, 0.66, -0.56
bezier=smoothIn, 0.25, 1, 0.5, 1 bezier=smoothIn, 0.25, 1, 0.5, 1