sway/i3status-wrapper: Usar --no-colors en vez de hacer manualmente
This commit is contained in:
parent
7bcde0ecb0
commit
94597e8744
1 changed files with 1 additions and 6 deletions
|
@ -2,18 +2,13 @@
|
|||
|
||||
. ~/.profile
|
||||
|
||||
# https://stackoverflow.com/a/54547589
|
||||
strip() {
|
||||
cat /dev/stdin | sed $'s/\e\\[[0-9;:]*[a-zA-Z]//g'
|
||||
}
|
||||
|
||||
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_obj='{"name":"zeit","instance":"zeit","markup":"none","full_text":"'$(zeit tracking | strip)'"}'
|
||||
zeit_obj='{"name":"zeit","instance":"zeit","markup":"none","full_text":"'$(zeit tracking --no-colors)'"}'
|
||||
json_array="$(echo $json_array | jq ". |= [$zeit_obj] + .")"
|
||||
echo "$json_array,"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue