1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

Fix waybar config issue with redundant data on wifi connections

This commit is contained in:
Stefan Ellmauthaler 2022-09-07 12:21:37 +02:00
parent eb08f1430f
commit c4c6e6f4ac
Failed to extract signature

View File

@ -10,9 +10,7 @@ with lib; {
cfg = nixosConfig.elss.graphical.sway; cfg = nixosConfig.elss.graphical.sway;
in in
mkIf cfg.enable { mkIf cfg.enable {
xdg.configFile."waybar/style.css" = { xdg.configFile."waybar/style.css" = {source = conf/waybar/style.css;};
source = conf/waybar/style.css;
};
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
@ -20,7 +18,16 @@ with lib; {
mainBar = { mainBar = {
modules-left = ["sway/workspaces" "sway/mode"]; modules-left = ["sway/workspaces" "sway/mode"];
modules-center = ["sway/window"]; modules-center = ["sway/window"];
modules-right = ["idle_inhibitor" "sway/language" "network#wifi" "network#base" "battery" "pulseaudio" "clock" "tray"]; modules-right = [
"idle_inhibitor"
"sway/language"
"network#wifi"
"network#base"
"battery"
"pulseaudio"
"clock"
"tray"
];
"idle_inhibitor" = { "idle_inhibitor" = {
format = "{icon}"; format = "{icon}";
@ -42,9 +49,7 @@ with lib; {
format-alt = "{time} {icon}"; format-alt = "{time} {icon}";
format-icons = ["" "" "" "" ""]; format-icons = ["" "" "" "" ""];
}; };
"clock" = { "clock" = {format-alt = "{:%a, %d. %b %H:%M}";};
format-alt = "{:%a, %d. %b %H:%M}";
};
"network#wifi" = { "network#wifi" = {
interface = "wlp2s0"; interface = "wlp2s0";
@ -61,7 +66,7 @@ with lib; {
"network#base" = { "network#base" = {
format = "{ifname}"; format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) "; format-wifi = "";
format-ethernet = "{ipaddr}/{cidr} "; format-ethernet = "{ipaddr}/{cidr} ";
format-disconnected = ""; format-disconnected = "";
tooltip-format = "{ifname} via {gwaddr} "; tooltip-format = "{ifname} via {gwaddr} ";
@ -77,11 +82,7 @@ with lib; {
format-muted = "🔇"; format-muted = "🔇";
format-icons = { format-icons = {
headphones = ""; headphones = "";
default = [ default = ["🔈" "🔉" "🔊"];
"🔈"
"🔉"
"🔊"
];
}; };
scroll-step = 5; scroll-step = 5;
on-click = "${pkgs.pamixer}/bin/pamixer -t"; on-click = "${pkgs.pamixer}/bin/pamixer -t";