Add notification thingy to waybar

This commit is contained in:
Erwin Boskma 2022-06-15 11:59:11 +02:00
parent ce9ebd9c6c
commit 48b50f6301
Signed by: erwin
GPG key ID: 270B20D17394F7E5

View file

@ -47,7 +47,7 @@ in
"clock#date"
"clock#time"
"idle_inhibitor"
# "custom/dunst"
"custom/notifications"
];
modules = {
"clock#time" = {
@ -173,11 +173,21 @@ in
deactivated = "";
};
};
# "custom/dunst" = {
# exec = "${wb-dunst}/bin/wb-dunst";
# on-click = "${pkgs.dunst}/bin/dunstctl set-paused toggle";
# restart-interval = 1;
# };
"custom/notifications" = {
exec = "${pkgs.swaynotificationcenter}/bin/swaync-client --subscribe-waybar";
on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait";
on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
return-type = "json";
tooltip = false;
format = "{icon}";
format-icons = {
notification = "<span foreground='red'><sup></sup></span>";
none = "";
dnd-notification = "<span foreground='red'><sup></sup></span>";
dnd-none = "";
};
escape = true;
};
};
}
];
@ -370,7 +380,7 @@ in
font-weight: bold;
}
#custom-dunst {
#custom-notifications {
padding: 0 10px;
}
'';