calculate max cpu temp no matter how many temp zones
This commit is contained in:
parent
83aa587e9c
commit
68e90ed5dd
3 changed files with 12 additions and 4 deletions
9
cpu-temp.sh
Executable file
9
cpu-temp.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/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/sort | $system/uniq | $system/tail -n 1`
|
||||||
|
|
||||||
|
echo "${max_temp}°C"
|
|
@ -14,7 +14,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
cabal-install stack hsetroot
|
cabal-install stack hsetroot lm_sensors
|
||||||
wirelesstools ranger xpdf apvlv unstable.xidlehook blueman
|
wirelesstools ranger xpdf apvlv unstable.xidlehook blueman
|
||||||
fontconfig nodejs rustup gcc gdb
|
fontconfig nodejs rustup gcc gdb
|
||||||
binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy
|
binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy
|
||||||
|
|
|
@ -56,10 +56,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/temperature" = {
|
"module/temperature" = {
|
||||||
type = "internal/temperature";
|
type = "custom/script";
|
||||||
thermal-zone = 3;
|
|
||||||
interval = 5;
|
interval = 5;
|
||||||
format = "TEMP: <label>";
|
exec = "~/dev/dotfiles/cpu-temp.sh";
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/memory" = {
|
"module/memory" = {
|
||||||
|
|
Loading…
Reference in a new issue