From 87c295003995ffdb071551ce0fe56307aadfdda8 Mon Sep 17 00:00:00 2001 From: Stephen Szwiec <55602870+StephenSzwiec@users.noreply.github.com> Date: Wed, 10 Mar 2021 06:19:47 -0600 Subject: [PATCH] Handle color control sequences (#911) * 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. * typo changed to -Srf to reflect proposed change --- .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 45b01ad..35b072f 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 -Srf "$chartfile" ;; 2) notify-send -u low "$3 Updating..." "Updating $2 price..." updateprice "$1" && notify-send "$3 Update complete." "$2 price is now \$$(cat "$pricefile")" ;;