From 3a86cfe153ea8dfa34d3ef5ce94690e03072ebdd Mon Sep 17 00:00:00 2001 From: quirinecker Date: Sun, 21 Dec 2025 19:59:03 +0100 Subject: [PATCH] added flag for enabling the battery widget. This way battery can be disabled on devices, that dont need it --- homemanager/hyprpanel.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/homemanager/hyprpanel.nix b/homemanager/hyprpanel.nix index 0ebdfab..a1fb4e0 100644 --- a/homemanager/hyprpanel.nix +++ b/homemanager/hyprpanel.nix @@ -17,6 +17,12 @@ default = "John Doe"; description = "Username to be displayed"; }; + + modules.hyprpanel.battery.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable battery widget"; + }; }; config = lib.mkIf config.modules.hyprpanel.enable { @@ -40,6 +46,15 @@ shortcuts.enabled = false; }; bar.launcher.icon = ""; + bar.layouts."0".right = [ + "volume" + "network" + "bluetooth" + (lib.mkIf config.modules.hyprpanel.battery.enable "battery") + "systray" + "clock" + "notifications" + ]; terminal = "ghostty"; }; };