dotfiles/nixos/i3/polybar/cpu-temp.sh
2020-04-17 23:21:06 +01:00

11 lines
258 B
Bash
Executable file

#!/usr/bin/env bash
sensors=`which sensors`
egrep=`which egrep`
cut=`which cut`
sort=`which sort`
uniq=`which uniq`
tail=`which tail`
max_temp=`$sensors | $egrep -o '[0-9][0-9]\.[0-9].*\(' | $cut -d' ' -f 1 | $sort | $uniq | $tail -n 1`
echo "${max_temp}"