dotfiles/nixos/i3/polybar/cpu-temp.sh
2019-10-22 18:23:59 +01:00

9 lines
268 B
Bash
Executable file

#!/bin/sh
profile="$HOME/.nix-profile/bin/"
system="/run/current-system/sw/bin/"
sensors="$profile/sensors"
max_temp=`$sensors | $system/egrep -o '[0-9][0-9]\.[0-9].*\(' | $system/cut -d' ' -f 1 | $system/sort | $system/uniq | $system/tail -n 1`
echo "${max_temp}"