summaryrefslogtreecommitdiffstats
path: root/usecases/desktop/graphical/waybar.nix
diff options
context:
space:
mode:
Diffstat (limited to 'usecases/desktop/graphical/waybar.nix')
-rw-r--r--usecases/desktop/graphical/waybar.nix40
1 files changed, 20 insertions, 20 deletions
diff --git a/usecases/desktop/graphical/waybar.nix b/usecases/desktop/graphical/waybar.nix
index 15868fe..bad1e09 100644
--- a/usecases/desktop/graphical/waybar.nix
+++ b/usecases/desktop/graphical/waybar.nix
@@ -17,7 +17,7 @@ inputs:
17 modules-left = [ "sway/workspaces" "sway/mode" ]; 17 modules-left = [ "sway/workspaces" "sway/mode" ];
18 modules-center = lib.mkIf config.services.mpd.enable [ "mpd" ]; 18 modules-center = lib.mkIf config.services.mpd.enable [ "mpd" ];
19 modules-right = [ 19 modules-right = [
20 "idle_inhibitor" 20 "custom/notification"
21 "pulseaudio" 21 "pulseaudio"
22 "network#eth" 22 "network#eth"
23 "network#wlan" 23 "network#wlan"
@@ -59,26 +59,26 @@ inputs:
59 }; 59 };
60 }; 60 };
61 61
62 idle_inhibitor = { 62 "custom/notification" = let
63 swaync-client = "${lib.getBin config.home-manager.users.minijackson.services.swaync.package}/bin/swaync-client";
64 in {
63 format = "{icon}"; 65 format = "{icon}";
64 format-icons = { 66 format-icons = {
65 activated = ""; 67 notification = "󰂜<span foreground='red'><sup></sup></span>";
66 deactivated = ""; 68 none = "󰂜";
69 dnd-notification = "󰪑<span foreground='red'><sup></sup></span>";
70 dnd-none = "󰪑";
71 inhibited-notification = "󰂜<span foreground='red'><sup></sup></span>";
72 inhibited-none = "󰂜";
73 dnd-inhibited-notification = "󰪑<span foreground='red'><sup></sup></span>";
74 dnd-inhibited-none = "󰪑";
67 }; 75 };
68 on-click = let 76 tooltip = false;
69 script = pkgs.writeShellApplication { 77 return-type = "json";
70 name = "switch-idle-mode"; 78 exec = "${swaync-client} -swb";
71 runtimeInputs = [pkgs.mako pkgs.gnugrep]; 79 on-click = "${swaync-client} -t -sw";
72 text = '' 80 on-click-right = "${swaync-client} -d -sw";
73 if makoctl mode | grep -q do-not-disturb; then 81 escape = true;
74 makoctl mode -r do-not-disturb
75 else
76 makoctl mode -a do-not-disturb
77 fi
78 '';
79 };
80 in
81 lib.getExe script;
82 }; 82 };
83 83
84 clock = { 84 clock = {
@@ -176,7 +176,7 @@ inputs:
176 border-bottom: 3px solid ${foreground}; 176 border-bottom: 3px solid ${foreground};
177 } 177 }
178 178
179 #clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-mpd, #mpd, #tray, #mode, #idle_inhibitor { 179 #clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-mpd, #mpd, #tray, #mode, #custom-notification {
180 padding: 0 10px; 180 padding: 0 10px;
181 margin: 0 5px; 181 margin: 0 5px;
182 } 182 }
@@ -263,7 +263,7 @@ inputs:
263 background-color: #2980b9; 263 background-color: #2980b9;
264 } 264 }
265 265
266 #idle_inhibitor { 266 #custom-notification {
267 background-color: ${lightBackground}; 267 background-color: ${lightBackground};
268 } 268 }
269 269