23 lines
547 B
Bash
Executable file
23 lines
547 B
Bash
Executable file
#!/bin/sh
|
|
|
|
. ~/.profile
|
|
. ~/.cache/themer.lua/shell
|
|
|
|
i3status | while true; do
|
|
read line
|
|
json_array="$(echo $line | grep -F [{ | sed -e 's/^,//')"
|
|
if test -z "$json_array"; then
|
|
echo "$line"
|
|
else
|
|
zeit="$(zeit tracking --no-colors)"
|
|
if echo "$zeit" | grep -F tracking >/dev/null; then
|
|
color="$accent"
|
|
else
|
|
color="$foreground"
|
|
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
|
|
done
|