summaryrefslogtreecommitdiff
path: root/.config/i3/i3status_script.sh
blob: b77883607794ef79b1d6652485799a8e0f2da4a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#
# | '__/ _ \ / _` / __|    Roger González
# | | | (_) | (_| \__ \    https://rogs.me
# |_|  \___/ \__, |___/    https://git.rogs.me
#            |___/
#
i3status --config ~/.config/i3status/config | while :
do
    read line
    LG=$(setxkbmap -query | awk '/layout/{print $2}')
    if [ $LG == "es" ]
    then
        dat="[{ \"full_text\": \"LANG: $LG\", \"color\":\"#88b090\" },"
    else
        dat="[{ \"full_text\": \"LANG: $LG\", \"color\":\"#e89393\" },"
    fi
    echo "${line/[/$dat}" || exit 1
done