Skip to content

Instantly share code, notes, and snippets.

@yunginnanet
Created December 27, 2022 23:42
Show Gist options
  • Save yunginnanet/24ba28b9e09181b8582a7e1ab49e4782 to your computer and use it in GitHub Desktop.
Save yunginnanet/24ba28b9e09181b8582a7e1ab49e4782 to your computer and use it in GitHub Desktop.
while :; do data="$(sensors | grep Tctl | awk '{print $2}' | tr -d '+' | awk -F '.' '{print $1}')"; case $data in 4[0-9]) col="blue" ;; 5[0-9]) col="green" ;; 5[0-9]) col="green" ;; 6[0-9]) col="yellow" ;; 7[0-9]) col="red" ;; 8[0-9]) col="red" ;; 9[0-9]) col="red" ;; *) col="white" ;; esac ; out="$(echo "$data°C" | toilet -f fig.mono12 | colorize $col/black --attr bold)"; clear; echo "$out"; sleep 0.5; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment