diff --git a/cpu-temp.sh b/cpu-temp.sh new file mode 100755 index 00000000..c7c80523 --- /dev/null +++ b/cpu-temp.sh @@ -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" diff --git a/nixos/home.nix b/nixos/home.nix index 34d5a8ba..2aecffce 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -14,7 +14,7 @@ in }; }; home.packages = with pkgs; [ - cabal-install stack hsetroot + cabal-install stack hsetroot lm_sensors wirelesstools ranger xpdf apvlv unstable.xidlehook blueman fontconfig nodejs rustup gcc gdb binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy diff --git a/nixos/polybar.nix b/nixos/polybar.nix index 663964b3..e725ab3f 100644 --- a/nixos/polybar.nix +++ b/nixos/polybar.nix @@ -56,10 +56,9 @@ }; "module/temperature" = { - type = "internal/temperature"; - thermal-zone = 3; + type = "custom/script"; interval = 5; - format = "TEMP: