add temp-percore

This commit is contained in:
x70b1 2017-12-06 08:17:02 +01:00
parent b330fe1c5b
commit a60e39d610
2 changed files with 16 additions and 0 deletions

View File

@ -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
```

View File

@ -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/ $//'