From 94597e8744259ac74196393ddf3079d3d27a1d25 Mon Sep 17 00:00:00 2001 From: Nulo Date: Sun, 27 Mar 2022 14:58:51 -0300 Subject: [PATCH] sway/i3status-wrapper: Usar --no-colors en vez de hacer manualmente --- .config/sway/i3status-wrapper | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.config/sway/i3status-wrapper b/.config/sway/i3status-wrapper index 7a5365a..f072061 100755 --- a/.config/sway/i3status-wrapper +++ b/.config/sway/i3status-wrapper @@ -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