diff --git a/.config/sway/i3status-wrapper b/.config/sway/i3status-wrapper index 488b4dd..1f2de5c 100755 --- a/.config/sway/i3status-wrapper +++ b/.config/sway/i3status-wrapper @@ -8,7 +8,13 @@ i3status | while true; do if test -z "$json_array"; then echo "$line" 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] + .")" echo "$json_array," fi