about summary refs log tree commit diff
path: root/home/profiles/gui
diff options
context:
space:
mode:
Diffstat (limited to 'home/profiles/gui')
-rw-r--r--home/profiles/gui/config/waybar/settings.nix10
-rw-r--r--home/profiles/gui/default.nix5
2 files changed, 12 insertions, 3 deletions
diff --git a/home/profiles/gui/config/waybar/settings.nix b/home/profiles/gui/config/waybar/settings.nix
index 83b5cf7..1901958 100644
--- a/home/profiles/gui/config/waybar/settings.nix
+++ b/home/profiles/gui/config/waybar/settings.nix
@@ -1,13 +1,19 @@
-{ neotheme }:
+{ config, lib, neotheme }:
 
 with neotheme.colors;
+
+let
+  guiCfg = config.profiles.gui;
+in
 {
   layer = "bottom";
   position = "top";
   height = 22;
   modules-left = [ "pulseaudio" "custom/separator" "cpu" "custom/separator" "memory" "custom/separator" "idle_inhibitor" ];
   modules-center = [ "sway/workspaces" ];
-  modules-right = [ "network" "custom/separator" "battery" "custom/separator" "clock" ];
+  modules-right = [ "network" "custom/separator" ]
+    ++ lib.optionals (guiCfg.laptop.enable) [ "battery" "custom/separator" ]
+    ++ [ "clock" ];
 
   "sway/workspaces" = {
     all-outputs = true;
diff --git a/home/profiles/gui/default.nix b/home/profiles/gui/default.nix
index 65d2c4a..edc1646 100644
--- a/home/profiles/gui/default.nix
+++ b/home/profiles/gui/default.nix
@@ -13,6 +13,9 @@ in
     enable = lib.mkEnableOption
       "The gui profile, sets up sway and related applications.";
 
+    laptop.enable = lib.mkEnableOption
+      "Enable laptop-specific tweaks";
+
     font = {
       name = lib.mkOption {
         type = lib.types.str;
@@ -131,7 +134,7 @@ in
       waybar = {
         enable = config.wayland.windowManager.sway.enable;
 
-        settings = [ (import ./config/waybar/settings.nix { inherit neotheme; }) ];
+        settings = [ (import ./config/waybar/settings.nix { inherit config lib neotheme; }) ];
 
         style = import ./config/waybar/style.nix { inherit config neotheme; };
       };