From 8f1de7b418d5a73181dbc47e3385f3c145dd0a4c Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Tue, 5 Nov 2024 06:55:54 +0100 Subject: [PATCH] waybar: add network status --- dot-config/waybar/config.jsonc | 64 ++++++++++++++++++++++++---------- dot-config/waybar/style.css | 11 ++++++ 2 files changed, 57 insertions(+), 18 deletions(-) diff --git a/dot-config/waybar/config.jsonc b/dot-config/waybar/config.jsonc index b315b29d..64b1a939 100644 --- a/dot-config/waybar/config.jsonc +++ b/dot-config/waybar/config.jsonc @@ -20,7 +20,8 @@ "memory", "group/temps", "group/gammarelay", - "wireplumber", + "network", + "wireplumber", "hyprland/language", "custom/voidspacer", "tray", @@ -82,6 +83,33 @@ "format-en": "en", "format-de": "de" }, + "niri/workspaces": { + "format": "{icon}", + "format-icons": { + // Named workspaces + // (you need to configure them in niri) + "1": "", + "2": "", + "3": "", + + // Icons by state + "active": "", + "default": "" + }, + "niri/window": { + "format": "{}", + "rewrite": { + "(.*) - Mozilla Firefox": "🌎 $1", + "(.*) - zsh": "> [$1]" + } + }, + "niri/language": { + //"format": " 󰌌 {} ", + "format": " 󰌌 {} ", + "format-en": "en", + "format-de": "de" + }, +}, "keyboard-state": { "numlock": true, "capslock": true, @@ -160,58 +188,58 @@ }, "cpu": { //"format": "{usage:2}% ", - "format": "{usage:2}% ", + "format": "{usage:2}%", "on-click": "footclient -a popup btop -p 3", "interval": 1 }, "memory": { //"format": "{percentage:2}% 󰳿", - "format": "{percentage:2}% 󰳿", + "format": "{percentage:2}%", "on-click": "footclient -a popup btop -p 4", "interval": 1 }, "temperature#water": { "hwmon-path": "/dev/sensors/aquastream/temp2_input", "critical-threshold": 42, - //"format": "{temperatureC}°C 󰞍", - "format": "{temperatureC}°C 󰞍", + //"format": "{temperatureC}°C ", + "format": " {temperatureC}°C", "on-click-right": "foot -a popup /usr/local/bin/fan2go-tui" }, "temperature#cpu": { "hwmon-path": "/dev/sensors/k10temp/temp1_input", "critical-threshold": 95, //"format": "{temperatureC}°C " - "format": "{temperatureC}°C " + "format": " {temperatureC}°C" }, "temperature#board": { "hwmon-path": "/dev/sensors/nct6799/temp1_input", "critical-threshold": 85, //"format": "{temperatureC}°C 󰇅" - "format": "{temperatureC}°C 󰇅" + "format": "󰇅 {temperatureC}°C" }, "temperature#gpu": { "hwmon-path": "/dev/sensors/gpudedicated/temp1_input", "critical-threshold": 110, //"format": "{temperatureC}°C 󰍹" - "format": "{temperatureC}°C 󰍹" + "format": "󰍹 {temperatureC}°C" }, "network": { - "interface": "wlan0*", - "format-wifi": " {essid} ({signalStrength}%)", - "format-ethernet": "{ipaddr}/{cidr} ", - "tooltip-format": "{ifname} via {gwaddr} ", - "format-linked": "{ifname} (No IP) ", + "format-wifi": "  ", + "format-ethernet": "  ", + "tooltip-format-ethernet": " {ifname} via {gwaddr}", + "tooltip-format-wifi": " {essid} ({signalStrength}%)", + "format-linked": " {ifname} (No IP)", "format-disconnected": "⚠ ", "format-alt": "{ifname}: {ipaddr}/{cidr}" }, "wireplumber": { "scroll-step": 5, //"format": "{volume} {icon}", - "format": "{volume} {icon}", + "format": "{icon} {volume}", "format-bluetooth": "{icon} {volume}%", "format-bluetooth-muted": " {icon}", "format-muted": " ", - "format-source": "{volume} ", + "format-source": " {volume}", "format-source-muted": "", "format-icons": { "headphone": "", @@ -288,7 +316,7 @@ }, "custom/gammarelay-temperature": { //"format": "{} ", - "format": "{} ", + "format": " {}", "exec": "wl-gammarelay-rs watch {t}", "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n +100", "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100", @@ -298,7 +326,7 @@ }, "custom/gammarelay-brightness": { //"format": "{}% ", - "format": "{}% ", + "format": " {}%", "exec": "wl-gammarelay-rs watch {bp}", "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateBrightness d +0.02", "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateBrightness d -0.02", @@ -306,7 +334,7 @@ }, "custom/gammarelay-gamma": { //"format": "{} 𝛄", - "format": "{} 𝛄", + "format": "𝛄 {}", "exec": "wl-gammarelay-rs watch {g}", "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateGamma d +0.02", "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateGamma d -0.02", diff --git a/dot-config/waybar/style.css b/dot-config/waybar/style.css index 15f9d080..a2b2d267 100644 --- a/dot-config/waybar/style.css +++ b/dot-config/waybar/style.css @@ -184,6 +184,17 @@ window#waybar { margin-bottom: 2px; } +#network { + padding-left: 4px; + padding-right: 8px; + color: @base0E; + background-color: alpha(@base0E, 0.1); + border: none; + border-radius: 8px; + margin-top: 2px; + margin-bottom: 2px; +} + #language { padding-left: 4px; padding-right: 8px; -- 2.51.2