From 79e0ce4173033b835020fa589055f51f8006793d Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Wed, 22 May 2024 23:47:21 +0300 Subject: [PATCH] desktop: fix CPU temperature on violet --- .config/polybar/config | 2 +- Desktop.org | 4 +++- bin/polybar.sh | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/polybar/config b/.config/polybar/config index 9a7be6a..eab7009 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -451,7 +451,7 @@ ramp-capacity-4 =  ; [[file:../../Desktop.org::*temperature][temperature:1]] [module/temperature] type = internal/temperature -interval = 10 +interval = 2 hwmon-path = ${env:TEMP_HWMON_PATH} diff --git a/Desktop.org b/Desktop.org index da3e993..30be422 100644 --- a/Desktop.org +++ b/Desktop.org @@ -2264,6 +2264,7 @@ declare -A BLOCKS=( declare -A TEMP_HWMON_PATHS=( ["eminence"]="/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp1_input" ["indigo"]="/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input" + ["violet"]="/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input" ) # Geolocation for some modules @@ -2281,6 +2282,7 @@ for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do fi SIZE=${FONT_SIZES[$MONITOR]} SCALE=${EMOJI_SCALE[$MONITOR]} + TEMP=${TEMP_HWMON_PATHS[$(hostname)]} if [[ -z "$SCALE" ]]; then continue fi @@ -2699,7 +2701,7 @@ ramp-capacity-4 =  #+begin_src conf-windows :noweb yes [module/temperature] type = internal/temperature -interval = 10 +interval = 2 hwmon-path = ${env:TEMP_HWMON_PATH} diff --git a/bin/polybar.sh b/bin/polybar.sh index cf0b4ed..a558500 100755 --- a/bin/polybar.sh +++ b/bin/polybar.sh @@ -57,6 +57,7 @@ declare -A BLOCKS=( declare -A TEMP_HWMON_PATHS=( ["eminence"]="/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp1_input" ["indigo"]="/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input" + ["violet"]="/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input" ) # Geolocation for some modules @@ -74,6 +75,7 @@ for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do fi SIZE=${FONT_SIZES[$MONITOR]} SCALE=${EMOJI_SCALE[$MONITOR]} + TEMP=${TEMP_HWMON_PATHS[$(hostname)]} if [[ -z "$SCALE" ]]; then continue fi