From 019fdfc8bb17a2e05a218c9ad6a4a4443e681f5f Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Thu, 18 Jun 2026 19:13:20 +0100 Subject: [PATCH] feat(waybar): drop redundant network module, enlarge power-profile glyph The network/wifi indicator duplicated nm-applet, which already sits in the tray (services.network-manager-applet.enable), so remove it from the bar. And the power-profile speedometer glyph rendered noticeably smaller than the neighbouring indicators, so bump its font-size (+3pt generated; 20px summer-day, 17px summer-night). Applied to the generated bar (waybar.nix) and both whole-swap themes (summer-day/night waybar.{jsonc,css}) for parity. Co-Authored-By: Claude Opus 4.8 --- modules/home/waybar.nix | 19 ++++++++----------- themes/summer-day/waybar.css | 6 +++++- themes/summer-day/waybar.jsonc | 10 +--------- themes/summer-night/waybar.css | 6 +++++- themes/summer-night/waybar.jsonc | 10 +--------- 5 files changed, 20 insertions(+), 31 deletions(-) diff --git a/modules/home/waybar.nix b/modules/home/waybar.nix index aba5ffa..6b360f1 100644 --- a/modules/home/waybar.nix +++ b/modules/home/waybar.nix @@ -77,7 +77,7 @@ let modules-left = [ "hyprland/workspaces" "hyprland/window" ]; modules-center = [ "clock" ]; - modules-right = [ "tray" "pulseaudio" "network" "cpu" "memory" "custom/powerprofile" ] + modules-right = [ "tray" "pulseaudio" "cpu" "memory" "custom/powerprofile" ] ++ lib.optional showLanguage "hyprland/language" ++ [ "battery" "custom/notification" ]; @@ -111,15 +111,8 @@ let on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }; - network = { - format-wifi = "󰤨 {essid}"; - format-ethernet = "󰈀"; - format-disconnected = "󰤭"; - tooltip-format = "{ipaddr} via {gwaddr}"; - # nm-applet sits in the tray for the GUI path; this is the - # keyboard-friendly one. - on-click = "${config.nomarchy.terminal} -e nmtui"; - }; + # No network module: nm-applet lives in the tray (the GUI path), so the + # bar's wifi/ethernet indicator would just duplicate it. cpu.format = "󰍛 {usage}%"; memory.format = "󰾆 {percentage}%"; @@ -209,11 +202,15 @@ let font-weight: bold; } - #tray, #pulseaudio, #network, #cpu, #memory, #custom-powerprofile, #language, #battery, #custom-notification { + #tray, #pulseaudio, #cpu, #memory, #custom-powerprofile, #language, #battery, #custom-notification { color: @subtext; padding: 0 10px; } + /* The power-profile speedometer glyph renders small in its em box — + size it up so it reads at a glance like the other indicators. */ + #custom-powerprofile { font-size: ${toString (t.fonts.size + 3)}pt; } + /* notifications waiting → accent; Do-Not-Disturb → muted bell-off */ #custom-notification.notification { color: @accent; } #custom-notification.dnd-none, diff --git a/themes/summer-day/waybar.css b/themes/summer-day/waybar.css index 1b83990..4c8f7ed 100755 --- a/themes/summer-day/waybar.css +++ b/themes/summer-day/waybar.css @@ -47,7 +47,6 @@ window#waybar { #clock-date, #workspaces, #pulseaudio, -#network, #custom-powerprofile, #battery, #tray, @@ -71,6 +70,11 @@ window#waybar { padding: 0px; } +/* The power-profile speedometer glyph renders small in its em box. */ +#custom-powerprofile { + font-size: 20px; +} + #workspaces button.active { background-color: @blue; color: @bg0; diff --git a/themes/summer-day/waybar.jsonc b/themes/summer-day/waybar.jsonc index a5c0fd7..71e99b0 100644 --- a/themes/summer-day/waybar.jsonc +++ b/themes/summer-day/waybar.jsonc @@ -11,7 +11,7 @@ "modules-left": ["custom/launcher", "clock", "clock#date"], "modules-center": ["hyprland/workspaces"], - "modules-right": ["pulseaudio", "network", "custom/powerprofile", "battery", "tray", "custom/notification", "custom/powermenu"], + "modules-right": ["pulseaudio", "custom/powerprofile", "battery", "tray", "custom/notification", "custom/powermenu"], "hyprland/workspaces": { "disable-scroll": true, @@ -46,14 +46,6 @@ "tooltip-format": "Playing at {volume}%" }, - "network": { - "format-wifi": " {signalStrength}%", - "format-ethernet": "", - "format-disconnected": "󰤭", - "on-click": "sh -c '$TERMINAL -e nmtui'", - "tooltip-format": "{ipaddr} via {gwaddr}" - }, - "battery": { "interval": 60, "states": { "warning": 30, "critical": 15 }, diff --git a/themes/summer-night/waybar.css b/themes/summer-night/waybar.css index 6d29cbe..81999e6 100644 --- a/themes/summer-night/waybar.css +++ b/themes/summer-night/waybar.css @@ -53,7 +53,6 @@ window#waybar { #clock.date, #workspaces, #pulseaudio, -#network, #custom-powerprofile, #idle_inhibitor, #battery, @@ -75,6 +74,11 @@ window#waybar { color: @fg; } +/* The power-profile speedometer glyph renders small in its em box. */ +#custom-powerprofile { + font-size: 17px; +} + #tray > .needs-attention { color: @green; } diff --git a/themes/summer-night/waybar.jsonc b/themes/summer-night/waybar.jsonc index a20e96a..a30a535 100644 --- a/themes/summer-night/waybar.jsonc +++ b/themes/summer-night/waybar.jsonc @@ -11,7 +11,7 @@ "modules-left": ["custom/nomarchy", "clock", "clock#date"], "modules-center": ["hyprland/workspaces"], - "modules-right": ["idle_inhibitor", "pulseaudio", "network", "custom/powerprofile", "battery", "tray", "custom/notification", "custom/powermenu"], + "modules-right": ["idle_inhibitor", "pulseaudio", "custom/powerprofile", "battery", "tray", "custom/notification", "custom/powermenu"], "hyprland/workspaces": { "disable-scroll": true, @@ -55,14 +55,6 @@ "tooltip-format": "{desc} | {volume}%" }, - "network": { - "format-wifi": " {essid}", - "format-ethernet": "", - "format-disconnected": "󰤭", - "on-click": "sh -c '$TERMINAL -e nmtui'", - "tooltip-format": "{ipaddr} via {gwaddr}" - }, - "battery": { "interval": 30, "states": { "warning": 25, "critical": 10 },