From 6fc7f49449cb237e1aa37eb1025461fe3ea39589 Mon Sep 17 00:00:00 2001 From: seraphim <18ycm9tx@anonaddy.me> Date: Thu, 27 Aug 2026 11:50:43 +0700 Subject: . --- .config/waybar/config.jsonc | 2 +- .config/waybar/kbd-layout.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to '.config/waybar') diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 3ee4c2c..704f4a7 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -57,7 +57,7 @@ "memory": { "interval": 2, - "format": "RAM {percentage:02}%", + "format": "RAM {used:0.1f} / {total:0.1f} GB", "on-click": "foot btop", "states": { "warning": 50, diff --git a/.config/waybar/kbd-layout.sh b/.config/waybar/kbd-layout.sh index e81462a..b1cad08 100755 --- a/.config/waybar/kbd-layout.sh +++ b/.config/waybar/kbd-layout.sh @@ -8,14 +8,13 @@ done STATE="${XDG_RUNTIME_DIR:-/tmp}/waybar-kbd.state" rm -f "$STATE" -# Index of the Russian layout (from configured layouts), so we don't hardcode order. RUS_IDX=$(niri msg keyboard-layouts 2>/dev/null | grep -i russian | grep -oE '^[ *]*[0-9]+' | tr -d ' *' | head -1) kbd_query() { niri msg keyboard-layouts 2>/dev/null | grep -Fm1 '*' | grep -qi russian && echo Ru || echo En } -# Parse a "Keyboard layout switched: N" or "...current_idx: N" event line. +# Parse a "Keyboard layout switched kbd_event() { idx=$(printf '%s' "$1" | grep -oE '[0-9]+' | tail -1) [ "$idx" = "$RUS_IDX" ] && echo Ru || echo En -- cgit v1.2.3