From 79aff35538076ee9486418749e880b11bccca255 Mon Sep 17 00:00:00 2001 From: listout Date: Mon, 17 Jan 2022 23:18:23 +0530 Subject: use environment variable for temperature module --- .config/polybar/launch.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.config/polybar/launch.sh') diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh index c4e683a..791b22d 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch.sh @@ -1,7 +1,12 @@ #!/usr/bin/env bash +for i in /sys/class/hwmon/hwmon*/temp*_input; do + if [ "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*}))" = "k10temp: Tctl" ]; then + export HWMON_PATH="$i" + fi +done killall -q polybar echo "---" | tee -a /tmp/polybar1.log polybar mybar 2>&1 | tee -a /tmp/polybar1.log & disown - echo "Bar launched" +echo "Bar launched" -- cgit v1.2.3