about summary refs log tree commit diff
path: root/home/profiles/gui/config/waybar/settings.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/profiles/gui/config/waybar/settings.nix')
-rw-r--r--home/profiles/gui/config/waybar/settings.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/home/profiles/gui/config/waybar/settings.nix b/home/profiles/gui/config/waybar/settings.nix
index 9470824..341a1b3 100644
--- a/home/profiles/gui/config/waybar/settings.nix
+++ b/home/profiles/gui/config/waybar/settings.nix
@@ -1,4 +1,4 @@
-{ config, lib, neotheme }:
+{ config, lib, pkgs, neotheme }:
 
 with neotheme.colors;
 
@@ -10,7 +10,7 @@ in
   position = "top";
   height = 22;
   modules-left = [ "wireplumber" "custom/separator" "cpu" "custom/separator" "memory" "custom/separator" "idle_inhibitor" ];
-  modules-center = [ "sway/workspaces" ];
+  modules-center = [ "sway/workspaces" "custom/scratchpad-indicator" ];
   modules-right = [ "group/tray" "custom/separator" "network" "custom/separator" ]
     ++ lib.optionals (guiCfg.laptop.enable) [ "battery" "custom/separator" ]
     ++ [ "clock" ];
@@ -96,6 +96,16 @@ in
     tooltip = false;
   };
 
+  "custom/scratchpad-indicator" = {
+    format = "(+{})";
+    interval = 3;
+    return-type = "json";
+    hide-empty-text = true;
+    exec = "${pkgs.writeShellScript "scratchpad-indicator" (import ../../scripts/scratchpad-indicator.nix)}";
+    on-click = "exec swaymsg scratchpad show";
+    on-click-right = "exec swaymsg move scratchpad";
+  };
+
   "custom/separator" = {
     format = "|";
     interval = "once";