mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-23 05:22:53 +00:00
Adjustments to some modules
This commit is contained in:
parent
c902c352f3
commit
0233290c51
2 changed files with 12 additions and 8 deletions
|
@ -31,7 +31,7 @@ get_battery()
|
|||
BAT_ICON=$BATTERY_FULL_ICON
|
||||
elif [[ $capacity -le 25 ]]; then
|
||||
BAT_ICON=$BATTERY_4_ICON
|
||||
elif [[ $capacity -le 50 ]]; then
|
||||
elif [[ $capacity -le 60 ]]; then
|
||||
BAT_ICON=$BATTERY_3_ICON
|
||||
elif [[ $capacity -le $FULL_AT ]]; then
|
||||
BAT_ICON=$BATTERY_2_ICON
|
||||
|
|
|
@ -3,19 +3,23 @@
|
|||
# Gets temperature of the CPU
|
||||
# Dependencies: lm_sensors
|
||||
|
||||
PREFIX=' '
|
||||
FIRE=' '
|
||||
|
||||
WARNING_LEVEL=80
|
||||
|
||||
get_cputemp()
|
||||
{
|
||||
# CPU_T=$(cat /sys/devices/platform/coretemp.0/hwmon/hwmon?/temp2_input)
|
||||
# CPU_TEMP=$(expr $CPU_T / 1000)
|
||||
|
||||
CPU_TEMP="$(sensors | grep temp1 | awk 'NR==1{gsub("+", " "); gsub("\\..", " "); print $2"°C"}')"
|
||||
CPU_TEMP="$(sensors | grep temp1 | awk 'NR==1{gsub("+", " "); gsub("\\..", " "); print $2}')"
|
||||
|
||||
# elif [ "$CPU_TEMP" -le 10 ]; then
|
||||
# echo " $CPU_TEMP"
|
||||
# else
|
||||
# echo " $CPU_TEMP"
|
||||
# fi
|
||||
echo " $CPU_TEMP"
|
||||
if [ "$CPU_TEMP" -ge $WARNING_LEVEL ]; then
|
||||
PREFIX="$FIRE$PREFIX"
|
||||
fi
|
||||
|
||||
echo "$PREFIX$CPU_TEMP°C"
|
||||
}
|
||||
|
||||
get_cputemp
|
||||
|
|
Loading…
Reference in a new issue