i3status-wrapper: Solo poner en rojo cuando está trackeando

This commit is contained in:
Cat /dev/Nulo 2022-04-05 13:45:33 -03:00
parent ff84cb7bec
commit 1d85769bc7

View file

@ -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