commit a29851b86be112d6aab45842ad1e47ba374635f4 parent d9bd6aeda08ddf64a3617eaf3c8f8f7f3e5a8a23 Author: Anton Konyahin <me@konyahin.xyz> Date: Sat, 11 Feb 2023 20:26:54 +0300 scripts: add keyboard layout in the status line Diffstat:
M | scripts/dot-bin/status.sh | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/dot-bin/status.sh b/scripts/dot-bin/status.sh @@ -3,6 +3,10 @@ set -e while true; do - xsetroot -name "🔋$(apm -l)% $(date '+ %H:%M %d-%m-%Y')" - sleep 2 + LAYOUT=$(setxkbmap -query | grep layout | awk '{print $2}') + CHARGE=$(apm -l) + DATE=$(date '+ %H:%M %d-%m-%Y') + + xsetroot -name "🔋$CHARGE% $LAYOUT $DATE" + sleep 0.2 done