From 17d039286fe439390b938616d8b00b464d16ccce Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:28 +0100 Subject: style(waybar): tighten right cluster — tray rightmost, drop disk, compact MEM, drop LOAD label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - modules-right: tray moved past clock to the rightmost slot; disk dropped (used% on btrfs is ambiguous and the value rarely moves) - custom/memory: drop the available-side readout, output 'MEM 3.2G 40%' instead of 'MEM 3.2G (40%) / 4.5G (56%)' - cpu: drop the 'LOAD' literal — bare '{load:0.2f}' next to the usage% is unambiguous in context The disk module config block is left intact for easy reactivation. --- dot_config/waybar/config.jsonc | 13 ++++++------- dot_config/waybar/executable_memory-status.sh | 12 ++---------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/dot_config/waybar/config.jsonc b/dot_config/waybar/config.jsonc index 93180cb..275d795 100644 --- a/dot_config/waybar/config.jsonc +++ b/dot_config/waybar/config.jsonc @@ -9,7 +9,6 @@ "cpu", "temperature", "custom/memory", - "disk", "network#bond", "battery", "privacy", @@ -18,8 +17,8 @@ "idle_inhibitor", "custom/notifications", "custom/thunderbird", - "tray", "clock", + "tray", ], "sway/workspaces": { @@ -31,11 +30,11 @@ }, "cpu": { - "format": "CPU {usage}% LOAD {load:0.2f}", - "format-low": "CPU {usage}% LOAD {load:0.2f}", - "format-medium": "CPU {usage}% LOAD {load:0.2f}", - "format-high": "CPU {usage}% LOAD {load:0.2f}", - "format-critical": "CPU {usage}% LOAD {load:0.2f}", + "format": "CPU {usage}% {load:0.2f}", + "format-low": "CPU {usage}% {load:0.2f}", + "format-medium": "CPU {usage}% {load:0.2f}", + "format-high": "CPU {usage}% {load:0.2f}", + "format-critical": "CPU {usage}% {load:0.2f}", "states": { "low": 0, "medium": 30, diff --git a/dot_config/waybar/executable_memory-status.sh b/dot_config/waybar/executable_memory-status.sh index c68f5a4..33ccc04 100755 --- a/dot_config/waybar/executable_memory-status.sh +++ b/dot_config/waybar/executable_memory-status.sh @@ -10,20 +10,12 @@ function heat(p) { if (p < 80) return "#fe8019" return "#fb4934" } -function cool(p) { - if (p < 20) return "#fb4934" - if (p < 40) return "#fe8019" - if (p < 70) return "#fabd2f" - return "#b8bb26" -} /^MemTotal:/ { t = $2 } /^MemAvailable:/ { a = $2 } END { u = t - a up = u * 100 / t - ap = a * 100 / t - printf "{\"text\":\"MEM %.1fG (%d%%) / %.1fG (%d%%)\"}\n", \ - u / 1048576, heat(up), up, \ - a / 1048576, cool(ap), ap + printf "{\"text\":\"MEM %.1fG %d%%\"}\n", \ + u / 1048576, heat(up), up } ' /proc/meminfo -- cgit v1.3.1