diff options
| author | seraphim <18ycm9tx@anonaddy.me> | 2026-08-27 11:50:43 +0700 |
|---|---|---|
| committer | seraphim <18ycm9tx@anonaddy.me> | 2026-08-27 11:50:43 +0700 |
| commit | 6fc7f49449cb237e1aa37eb1025461fe3ea39589 (patch) | |
| tree | ceebc8a65556830627a4546da57e30e72945175e /.config/waybar | |
| parent | cc7b61a1496d25a100f012300c1121835a9f8177 (diff) | |
.
Diffstat (limited to '.config/waybar')
| -rw-r--r-- | .config/waybar/config.jsonc | 2 | ||||
| -rwxr-xr-x | .config/waybar/kbd-layout.sh | 3 |
2 files changed, 2 insertions, 3 deletions
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 |
