Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- t_warn=${1:-60}
- t_crit=${2:-75}
- t_curr=$(sensors -u acpitz-virtual-0 | awk '/input/{ printf "%d\n", $2}')
- if [[ "$t_curr" -lt "$t_warn" ]]
- then color="#90A959" #green - base16
- elif [[ "$t_curr" -ge "$t_warn" ]] && [[ "$t_curr" -lt "$t_crit" ]]
- then color="#D28445" #orange - base16
- else color="#AC4142" #red - base16
- fi
- # elements output for JSON (short text, full text, color)
- echo $t_curr"°"
- echo $t_curr"°"
- echo "$color"
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement