diff --git a/polybar-scripts/temp-percore/README.md b/polybar-scripts/temp-percore/README.md new file mode 100644 index 0000000..589fe4a --- /dev/null +++ b/polybar-scripts/temp-percore/README.md @@ -0,0 +1,13 @@ +# Script: temp-percore + +A script that displays the temperature for each core. You need [lm_sensors](https://archlinux.org/packages/lm_sensors). See the wiki to find out [how to configure](https://wiki.archlinux.org/index.php/lm_sensors) it. + +## Module + +``` +[module/temp-percore] +type = custom/script +exec = ~/polybar-scripts/temp-percore.sh +interval = 60 +exec-if = sensors +``` diff --git a/polybar-scripts/temp-percore/temp-percore.sh b/polybar-scripts/temp-percore/temp-percore.sh new file mode 100644 index 0000000..c5f804d --- /dev/null +++ b/polybar-scripts/temp-percore/temp-percore.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +sensors | grep Core | awk '{print substr($3, 2, length($3)-5)}' | tr '\n' ' ' | sed 's/ /°C /g' | sed 's/ $//'