diff --git a/.config/i3/scripts/get_lang.sh b/.config/i3/scripts/get_lang.sh new file mode 100755 index 0000000..34df672 --- /dev/null +++ b/.config/i3/scripts/get_lang.sh @@ -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 + diff --git a/.config/i3/scripts/status_bar.sh b/.config/i3/scripts/status_bar.sh index 1ea0dec..1e1b0d0 100755 --- a/.config/i3/scripts/status_bar.sh +++ b/.config/i3/scripts/status_bar.sh @@ -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