From dda00ad09ffbe404ffd561f8c60c404520ffd974 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Thu, 14 May 2026 13:10:32 +0100 Subject: [PATCH] --- settings/hyprland.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index f24adcb..1b15838 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -3,6 +3,8 @@ let hyprland-pkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}; + isMacbook = config.networking.hostName == "FredOS-Macbook"; + # GPU pinning env vars — only needed on the dual-GPU gaming box (card1 = Navi 22). gpuEnv = lib.optionals (config.networking.hostName == "FredOS-Gaming") [ "AQ_DRM_DEVICES,/dev/dri/card1" @@ -379,7 +381,7 @@ in modules-left = [ "hyprland/workspaces" ]; modules-center = [ "clock" ]; - modules-right = [ "group/tray-drawer" ]; + modules-right = lib.optionals isMacbook [ "battery" ] ++ [ "group/tray-drawer" ]; "hyprland/workspaces" = { format = "{name}"; @@ -424,6 +426,13 @@ in icon-size = 16; spacing = 8; }; + } // lib.optionalAttrs isMacbook { + battery = { + format = "{capacity}% {icon}"; + format-charging = "{capacity}% "; + format-icons = [ "" "" "" "" "" ]; + states = { warning = 30; critical = 15; }; + }; }; style = '' @@ -485,6 +494,13 @@ in padding: 0 0px; color: @base05; } + + #battery { + padding: 0 10px; + color: @base05; + } + #battery.warning { color: @base0A; } + #battery.critical { color: @base08; } ''; }; };