.config/i3/scripts/get_lang.sh

This commit is contained in:
q3aql 2025-08-12 15:27:53 +02:00
parent b5be64a202
commit 2eeff86faa
2 changed files with 15 additions and 1 deletions

13
.config/i3/scripts/get_lang.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
if [ -f /usr/bin/setxkbmap ] ; then
get_lang=$(setxkbmap -query 2> /dev/null | grep "layout:" | tr -s " " | cut -d ":" -f 2)
if [ -z ${get_lang} ] ; then
echo " us "
else
echo "${get_lang} "
fi
else
echo " us "
fi

View File

@ -8,7 +8,8 @@ while [ ${status_bar} -eq 0 ] ; do
cpuinfo=$(~/.config/i3/scripts/cpu_info.sh)
meminfo=$(~/.config/i3/scripts/mem_info.sh)
volume=$(~/.config/i3/scripts/get_volume.sh)
lang=$(~/.config/i3/scripts/get_lang.sh)
date=$(~/.config/i3/scripts/current_date.sh)
echo "${updates} ${kernel} ${cpuinfo} ${meminfo} ${volume} ${date}"
echo "${updates} ${kernel} ${cpuinfo} ${meminfo} ${volume} ${lang} ${date}"
sleep 2
done