From d5118fa47b32c85906b3c35996e7ad9826dd1a6d Mon Sep 17 00:00:00 2001 From: Stephen Szwiec <55602870+StephenSzwiec@users.noreply.github.com> Date: Tue, 9 Mar 2021 19:23:52 -0600 Subject: [PATCH] Handle color control sequences Is: `less` outputs the raw ascii of the $chartfile, which includes escape characters to change output colors. This does not resemble a graph. Should be: Adding -n flag to have `less` create colored output properly. --- .local/bin/statusbar/sb-price | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/sb-price b/.local/bin/statusbar/sb-price index 45b01adb..6b010ef5 100755 --- a/.local/bin/statusbar/sb-price +++ b/.local/bin/statusbar/sb-price @@ -21,7 +21,7 @@ updateprice() { ping -q -c 1 example.org >/dev/null 2>&1 && updateprice "$1" case $BLOCK_BUTTON in - 1) setsid "$TERMINAL" -e less -Sf "$chartfile" ;; + 1) setsid "$TERMINAL" -e less -Snf "$chartfile" ;; 2) notify-send -u low "$3 Updating..." "Updating $2 price..." updateprice "$1" && notify-send "$3 Update complete." "$2 price is now \$$(cat "$pricefile")" ;;