A temperature indicator for i3blocks, colored according to heat.
- awk (POSIX compatible)
- bc
- i3blocks
- fonts-font-awesome
Usage: ./gradient-temp [<options>] <command> [<args>]
Display a temperature indicator using lm_sensors for i3blocks.
Commands:
query <sensor> query sensor
help display help
Options:
-f display temperatures in fahrenheit
-G disable color gradient
-c <temp> override critical temperature
-m <temp> override maximum temperature
-h display this help and exit
Copy the blocklet configuration in the given i3blocks.conf
into your i3blocks configuration file, the recommended config is:
[gradient-temp]
label=🌡
markup=pango
command=$SCRIPT_DIR/gradient-temp
interval=10
instance=__REPLACE_ME__
#FONT=FontAwesome
#GRADIENT=true
#FAHRENHEIT=false
#COLOR_TEMP=white
#COLOR_GRADIENT_START=#0000FF
#COLOR_GRADIENT_END=#FF0000
#SYMBOL_C=℃
#SYMBOL_F=℉
#OVERRIDE_CRIT_TEMP=90
#OVERRIDE_MAX_TEMP=100
Set the instance
variable to the sensor to monitor, see sensors -u
.
The following can be set in your i3blocks.conf in newer versions if i3blocks, in older versions (<= 1.4-4) you can customize using the program options. The following are configurable:
Variable | Type | Option | Description |
---|---|---|---|
FONT | string | -f <font> | Font for text and symbols |
SENSOR | string | -s <sensor> | The sensor to read |
GRADIENT | boolean | -G | Whether or not to use the color gradient |
FAHRENHEIT | boolean | -H | Whether or not to use fahrenheit |
COLOR_TEMP | string | -t <color> | Color of text when not using the color gradient |
COLOR_GRADIENT_START | string | -S <#color> | Start color for gradient; Must be a hex triplet prefixed with # |
COLOR_GRADIENT_END | string | -E <#color> | End color for gradient; Must be a hex triplet prefixed with # |
SYMBOL_C | string | -C <symbol> | Symbol for celsius |
SYMBOL_F | string | -F <symbol> | Symbol for fahrenheit |
OVERRIDE_CRIT_TEMP | float | -c <temp> | Override critical temperature |
OVERRIDE_MAX_TEMP | float | -m <temp> | Override maximum temperature |
gradient-temp
is released under GNU General Public License v2
Copyright (C) 1989, 1991 Free Software Foundation, Inc.