waybar tweaks

This commit is contained in:
Rouven Seifert 2023-06-06 13:20:37 +02:00
parent d9c52d3cd1
commit ffa9588b9c
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
2 changed files with 27 additions and 3 deletions

View file

@ -4,6 +4,7 @@
swaylock-effects swaylock-effects
wl-clipboard wl-clipboard
swaynotificationcenter swaynotificationcenter
playerctl
]; ];
services.swayidle = { services.swayidle = {

View file

@ -1,6 +1,6 @@
{ self, config, ... }: { self, config, pkgs, ... }:
{ {
# systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.hyprland}/bin"; systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.swaynotificationcenter}/bin";
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
@ -12,7 +12,7 @@
height = 26; height = 26;
# modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ]; # modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/window" ];
modules-left = [ "sway/workspaces" "custom/spotifytitle" "sway/window" ]; modules-left = [ "sway/workspaces" "custom/spotifytitle" "sway/window" ];
modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ]; modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "custom/notification" "clock" ];
network = { network = {
format-wifi = " {essid} ({signalStrength}%)"; format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = "󰈀 {ipaddr}/{cidr}"; format-ethernet = "󰈀 {ipaddr}/{cidr}";
@ -30,6 +30,27 @@
# separate-outputs = true; # separate-outputs = true;
}; };
"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 -swb";
on-click = "swaync-client -t -sw";
on-click-right = "swaync-client -d -sw";
escape = true;
};
"custom/spotifytitle" = { "custom/spotifytitle" = {
format = " {}"; format = " {}";
max-length = 80; max-length = 80;
@ -109,6 +130,7 @@
} }
#custom-spotifytitle, #custom-spotifytitle,
#custom-notification,
#clock, #clock,
#battery, #battery,
#cpu, #cpu,
@ -194,6 +216,7 @@
color: #${config.colorScheme.colors.base01}; color: #${config.colorScheme.colors.base01};
} }
#custom-notification,
#tray { #tray {
background-color: #${config.colorScheme.colors.base01}; background-color: #${config.colorScheme.colors.base01};
color: #${config.colorScheme.colors.base05}; color: #${config.colorScheme.colors.base05};