dotfiles/nixos/i3/polybar/cpu-temp.sh

12 lines
258 B
Bash
Raw Normal View History

2020-04-17 23:21:06 +01:00
#!/usr/bin/env bash
sensors=`which sensors`
egrep=`which egrep`
cut=`which cut`
sort=`which sort`
uniq=`which uniq`
tail=`which tail`
2020-04-17 23:21:06 +01:00
max_temp=`$sensors | $egrep -o '[0-9][0-9]\.[0-9].*\(' | $cut -d' ' -f 1 | $sort | $uniq | $tail -n 1`
2019-10-22 18:23:59 +01:00
echo "${max_temp}"