waybar: added modules for sway notification center

This commit is contained in:
Tigor Hutasuhut 2024-10-16 21:41:09 +07:00
parent a46c19c390
commit 8af4513dcf
3 changed files with 37 additions and 7 deletions

View file

@ -19,7 +19,7 @@ in
./wlogout.nix
# ./swappy.nix
./alacritty.nix
./audio.nix
./swayosd.nix
./sway-notification-center.nix
./ntfy-sh.nix
];

View file

@ -454,3 +454,12 @@ window#waybar.empty #window {
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#custom-notification {
font-family: "NotoSansMono Nerd Font";
margin-right: 20px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: @iconcolor;
}

View file

@ -97,17 +97,38 @@ let
spacing = 10;
};
clock = {
format = "{:%H:%M %a}";
timezone = "Asia/Jakarta";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%Y-%m-%d}";
};
"custom/exit" = {
format = "";
on-click = "wlogout";
tooltip = false;
};
clock = {
format = "{:%H:%M %a}";
timezone = "Asia/Jakarta";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%Y-%m-%d}";
"custom/notification" = {
tooltip = false;
format = "{icon}";
format-icons = {
notification = "<span foreground='red'><sup></sup></span>";
none = "";
dnd-notification = "<span foreground='red'><sup></sup></span>";
dnd-none = "";
inhibited-notification = "<span foreground='red'><sup></sup></span>";
inhibited-none = "";
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
dnd-inhibited-none = "";
};
return-type = "json";
exec-if = "which swaync-client";
exec = "swaync-client --subscribe-waybar";
on-click = "swaync-client --toggle-panel --skip-wait";
on-click-right = "swaync-client --toggle-dnd --skip-wait";
escape = true;
};
};
in
@ -148,7 +169,7 @@ in
"bluetooth"
"battery"
"network"
# "group/hardware"
"custom/notification"
"custom/cliphist"
"idle_inhibitor"
"tray"