How to get the CPU temperature?
Getting the CPU temperature from command line can be achieved with:
printf '%d°\n' $(sensors | grep 'id 0:' | awk '{ print $4 }') 2>/dev/null
# 55°
Getting the CPU temperature from command line can be achieved with:
printf '%d°\n' $(sensors | grep 'id 0:' | awk '{ print $4 }') 2>/dev/null
# 55°
We can echo battery percentage with the following command:
upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}'
# 65%