summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/login/nwg/default.nix16
-rw-r--r--system/login/nwg/hyprland.lua.mustache24
2 files changed, 26 insertions, 14 deletions
diff --git a/system/login/nwg/default.nix b/system/login/nwg/default.nix
index 0038e48..487f9ba 100644
--- a/system/login/nwg/default.nix
+++ b/system/login/nwg/default.nix
@@ -6,26 +6,14 @@
}: let
inherit (lib) mkIf;
cfg = config.login.nwg;
-
nwg-style = lib.template.mustache ./nwg-hello.css.mustache config.theme;
nwg-command = "${pkgs.nwg-hello}/bin/nwg-hello --config ${./nwg-hello.json} --stylesheet ${nwg-style}";
-
- hyprland-config = pkgs.writeText "hyprland.conf" ''
- monitor=,preferred,auto,1
- bind = ALT, Q, killactive,
- misc {
- disable_hyprland_logo = true
- }
- animations {
- enabled = false
- }
- exec-once = ${nwg-command}; hyprctl dispatch exit
- '';
+ hyprland-config = lib.template.mustache ./hyprland.lua.mustache {command = nwg-command;};
in {
config = mkIf cfg.enable {
login.greetd = {
enable = true;
- session = "${pkgs.hyprland}/bin/start-hyprland -- --config ${hyprland-config}";
+ session = "${pkgs.hyprland}/bin/start-hyprland -- --config ${hyprland-config} 2>&1 >/dev/null";
};
};
}
diff --git a/system/login/nwg/hyprland.lua.mustache b/system/login/nwg/hyprland.lua.mustache
new file mode 100644
index 0000000..cc0192c
--- /dev/null
+++ b/system/login/nwg/hyprland.lua.mustache
@@ -0,0 +1,24 @@
+
+-- Hyprland compositor config for nwg-hello
+-- Simple and barebones
+
+hl.on("hyprland.start", function()
+ hl.exec_cmd("{{command}}; hyprctl dispatch exit")
+end)
+
+hl.bind("SUPER + SHIFT + L", hl.dsp.exit())
+hl.bind("ALT + Q", hl.dsp.window.close())
+
+hl.config({
+ animations = {
+ enabled = false,
+ },
+ misc = {
+ disable_hyprland_logo = true,
+ disable_splash_rendering = true,
+ },
+ ecosystem = {
+ no_update_news = true,
+ no_donation_nag = true,
+ },
+})