waybar: fix swaync-client missing by referencing package directly

Fix MS Teams waybar rewrite, I think the pipe was causing issues
This commit is contained in:
Evie Litherland-Smith 2024-01-29 14:14:48 +00:00
parent 1e45adf5aa
commit d4aab0d669

View file

@ -1,4 +1,4 @@
{ config, ... }: { { config, pkgs, ... }: {
systemd.user.targets.tray.Unit = { systemd.user.targets.tray.Unit = {
Description = "Home Manager System Tray"; Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ]; Requires = [ "graphical-session-pre.target" ];
@ -39,7 +39,7 @@
".*WebCord (.*)" = "󰙯 $1"; ".*WebCord (.*)" = "󰙯 $1";
"(Steam|steam)" = "󰓓 "; "(Steam|steam)" = "󰓓 ";
"(.*) - mpv" = "󰦟 $1"; "(.*) - mpv" = "󰦟 $1";
"(.*) | Microsoft Teams" = "󰊻 $1"; "Microsoft Teams - (.*)" = "󰊻 $1";
}; };
"separate-outputs" = true; "separate-outputs" = true;
}; };
@ -154,7 +154,8 @@
tooltip-format = "{capacity}% {time}"; tooltip-format = "{capacity}% {time}";
format-icons = [ "󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; format-icons = [ "󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
}; };
"custom/notification" = { "custom/notification" = let swaync = pkgs.swaynotificationcenter;
in {
"tooltip" = false; "tooltip" = false;
"format" = "{icon}{}"; "format" = "{icon}{}";
"format-icons" = { "format-icons" = {
@ -168,10 +169,10 @@
"dnd-inhibited-none" = "󰂜 "; "dnd-inhibited-none" = "󰂜 ";
}; };
"return-type" = "json"; "return-type" = "json";
"exec-if" = "which swaync-client"; "exec-if" = "which ${swaync}/bin/swaync-client";
"exec" = "swaync-client -swb"; "exec" = "${swaync}/bin/swaync-client -swb";
"on-click" = "swaync-client -t -sw"; "on-click" = "${swaync}/bin/swaync-client -t -sw";
"on-click-right" = "swaync-client -d -sw"; "on-click-right" = "${swaync}/bin/swaync-client -d -sw";
"escape" = true; "escape" = true;
}; };
tray = { tray = {