about summary refs log tree commit diff
path: root/home/profiles/gui/config
diff options
context:
space:
mode:
Diffstat (limited to 'home/profiles/gui/config')
-rw-r--r--home/profiles/gui/config/waybar/settings.nix14
-rw-r--r--home/profiles/gui/config/waybar/style.nix4
2 files changed, 16 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";
diff --git a/home/profiles/gui/config/waybar/style.nix b/home/profiles/gui/config/waybar/style.nix
index ac6aad7..1f5327e 100644
--- a/home/profiles/gui/config/waybar/style.nix
+++ b/home/profiles/gui/config/waybar/style.nix
@@ -107,6 +107,10 @@ in
     padding-right: 0.2rem;
   }
 
+  #custom-scratchpad-indicator {
+    color: #f0a0c0;
+  }
+
   #custom-separator {
     color: #${alt1};
     background-color: #${background};