Add swaync widget to waybar

This commit is contained in:
Evie Litherland-Smith 2024-01-03 19:18:40 +00:00
parent a59f7a1563
commit b2e206884b
4 changed files with 31 additions and 4 deletions

View file

@ -90,8 +90,8 @@ in ''
bind = SUPER, P, exec, pkill rofi || rofi-pass bind = SUPER, P, exec, pkill rofi || rofi-pass
bind = SUPER SHIFT, P, exec, pkill rofi || rofi-pass --last-used bind = SUPER SHIFT, P, exec, pkill rofi || rofi-pass --last-used
bind = SUPER ALT, P, exec, pkill rofi || rofi-pass --insert bind = SUPER ALT, P, exec, pkill rofi || rofi-pass --insert
bind = SUPER, Z, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t bind = SUPER, Z, exec, swaync-client -t -sw
bind = SUPER SHIFT, Z, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -d bind = SUPER SHIFT, Z, exec, swaync-client -d -sw
# Common program shortcuts # Common program shortcuts
bind = SUPER, Space, exec, rofi -replace -show combi bind = SUPER, Space, exec, rofi -replace -show combi
@ -246,7 +246,7 @@ in ''
bindm = SUPER, mouse:272, movewindow bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow bindm = SUPER, mouse:273, resizewindow
exec-once = ${pkgs.swaynotificationcenter}/bin/swaync exec-once = swaync
exec-once = ${pkgs.hyprpaper}/bin/hyprpaper exec-once = ${pkgs.hyprpaper}/bin/hyprpaper
exec-once = ${pkgs.dex}/bin/dex --autostart exec-once = ${pkgs.dex}/bin/dex --autostart
'' ''

View file

@ -23,6 +23,7 @@
"cpu" "cpu"
"memory" "memory"
"clock" "clock"
"custom/notification"
"custom/separator" "custom/separator"
"tray" "tray"
]; ];
@ -158,6 +159,26 @@
tooltip-format = "{time}"; tooltip-format = "{time}";
format-icons = [ "󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; format-icons = [ "󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
}; };
"custom/notification" = {
"tooltip" = false;
"format" = "{icon}";
"format-icons" = {
"notification" = "󱅫 ";
"none" = "󰂚 ";
"dnd-notification" = "󰅸 ";
"dnd-none" = "󰂜 ";
"inhibited-notification" = "󰅸 ";
"inhibited-none" = "󰂜 ";
"dnd-inhibited-notification" = "󰅸 ";
"dnd-inhibited-none" = "󰂜 ";
};
"return-type" = "json";
"exec-if" = "which swaync-client";
"exec" = "swaync-client -swb";
"on-click" = "swaync-client -t -sw";
"on-click-right" = "swaync-client -d -sw";
"escape" = true;
};
tray = { tray = {
icon-size = 16; icon-size = 16;
show-passive-items = true; show-passive-items = true;

View file

@ -84,6 +84,7 @@ tooltip {
#memory, #memory,
#temperature, #temperature,
#clock, #clock,
#custom-notification,
#tray { #tray {
margin: 0px; margin: 0px;
padding: 1px 5px; padding: 1px 5px;
@ -92,7 +93,8 @@ tooltip {
#workspaces, #workspaces,
#window, #window,
#mpris, #mpris,
#tray { #tray,
#custom-separator {
color: @text; color: @text;
} }
@ -130,3 +132,6 @@ tooltip {
#clock { #clock {
color: @mauve; color: @mauve;
} }
#custom-notification {
color: @lavender;
}

View file

@ -14,6 +14,7 @@
systemPackages = with pkgs; [ systemPackages = with pkgs; [
libsForQt5.polkit-kde-agent libsForQt5.polkit-kde-agent
swaylock swaylock
swaynotificationcenter
xdg-utils xdg-utils
hyprpaper hyprpaper
pipewire pipewire