Add keyboard lang status bar
This commit is contained in:
parent
e8c9bacafa
commit
5063eb8cd6
14
.config/sway/scripts/get_lang.sh
Executable file
14
.config/sway/scripts/get_lang.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sway_config="${HOME}/.config/sway/config"
|
||||||
|
|
||||||
|
if [ -f ${sway_config} ] ; then
|
||||||
|
get_lang=$(cat ${sway_config} | grep xkb_layout | grep -v "#" | head -1 | sed 's/xkb_layout//g' | cut -d '"' -f 2)
|
||||||
|
if [ -z ${get_lang} ] ; then
|
||||||
|
echo " us "
|
||||||
|
else
|
||||||
|
echo " ${get_lang} "
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo " us "
|
||||||
|
fi
|
@ -8,7 +8,8 @@ while [ ${status_bar} -eq 0 ] ; do
|
|||||||
cpuinfo=$(~/.config/sway/scripts/cpu_info.sh)
|
cpuinfo=$(~/.config/sway/scripts/cpu_info.sh)
|
||||||
meminfo=$(~/.config/sway/scripts/mem_info.sh)
|
meminfo=$(~/.config/sway/scripts/mem_info.sh)
|
||||||
volume=$(~/.config/sway/scripts/get_volume.sh)
|
volume=$(~/.config/sway/scripts/get_volume.sh)
|
||||||
|
lang=$(~/.config/sway/scripts/get_lang.sh)
|
||||||
date=$(~/.config/sway/scripts/current_date.sh)
|
date=$(~/.config/sway/scripts/current_date.sh)
|
||||||
echo "${updates} ${kernel} ${cpuinfo} ${meminfo} ${volume} ${date}"
|
echo "${updates} ${kernel} ${cpuinfo} ${meminfo} ${volume} ${lang} ${date}"
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user