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
wl-clipboard
swaynotificationcenter
playerctl
];
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 = {
enable = true;
systemd.enable = true;
@ -12,7 +12,7 @@
height = 26;
# modules-left = [ "wlr/workspaces" "custom/spotifytitle" "hyprland/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 = {
format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = "󰈀 {ipaddr}/{cidr}";
@ -30,6 +30,27 @@
# 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" = {
format = " {}";
max-length = 80;
@ -109,6 +130,7 @@
}
#custom-spotifytitle,
#custom-notification,
#clock,
#battery,
#cpu,
@ -194,6 +216,7 @@
color: #${config.colorScheme.colors.base01};
}
#custom-notification,
#tray {
background-color: #${config.colorScheme.colors.base01};
color: #${config.colorScheme.colors.base05};