summaryrefslogtreecommitdiff
path: root/.config/i3/i3status_script.sh
blob: 8b39354ac42f17690982485e2d7eca2895647c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

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