i3status-wrapper: Solo poner en rojo cuando está trackeando
This commit is contained in:
parent
ff84cb7bec
commit
1d85769bc7
1 changed files with 7 additions and 1 deletions
|
@ -8,7 +8,13 @@ i3status | while true; do
|
||||||
if test -z "$json_array"; then
|
if test -z "$json_array"; then
|
||||||
echo "$line"
|
echo "$line"
|
||||||
else
|
else
|
||||||
zeit_obj='{"name":"zeit","instance":"zeit","color":"#FF0000","markup":"none","full_text":"'$(zeit tracking --no-colors)'"}'
|
zeit="$(zeit tracking --no-colors)"
|
||||||
|
if echo "$zeit" | grep -F tracking >/dev/null; then
|
||||||
|
color="#FF0000"
|
||||||
|
else
|
||||||
|
color="#000000"
|
||||||
|
fi
|
||||||
|
zeit_obj='{"name":"zeit","instance":"zeit","color":"'$color'","markup":"none","full_text":"'$zeit'"}'
|
||||||
json_array="$(echo $json_array | jq ". |= [$zeit_obj] + .")"
|
json_array="$(echo $json_array | jq ". |= [$zeit_obj] + .")"
|
||||||
echo "$json_array,"
|
echo "$json_array,"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue