From 6206ccbf4820c610bc79d10bacc5f1c5cb4ca486 Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Sat, 26 Oct 2024 17:53:09 +0200 Subject: [PATCH] waybar: use customized udev paths for sensors applet because the kernel... ...kinda randomizes the position of usb-devices in sysfs (especially if there still is a memory stick stuck in a port after rebooting). Needs a custom udev rule like in this example: ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{name}=="nct6799", \ RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/sensors/nct6799'" ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{name}=="k10temp", \ RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/sensors/k10temp'" ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{name}=="aquastreamultimate", \ RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/sensors/aquastream'" ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{vendor}=="0x1002", ATTRS{device}=="0x1479", \ RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/sensors/gpudedicated'" ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{vendor}=="0x1002", ATTRS{device}=="0x13c0", \ RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/sensors/gpuonboard'" ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{vendor}=="0x144d", ATTRS{device}=="0x43f5", \ RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/sensors/ssd970evo'" ACTION=="add", SUBSYSTEM=="hwmon", ATTRS{vendor}=="0x144d", ATTRS{device}=="0xa80a", \ RUN+="/bin/sh -c 'ln -s /sys$devpath /dev/sensors/ssd980evo'" --- dot-config/waybar/config.jsonc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dot-config/waybar/config.jsonc b/dot-config/waybar/config.jsonc index 5a4cb62d..ca72ce44 100644 --- a/dot-config/waybar/config.jsonc +++ b/dot-config/waybar/config.jsonc @@ -168,23 +168,23 @@ "interval": 1 }, "temperature#water": { - "hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input", + "hwmon-path": "/dev/sensors/aquastream/temp2_input", "critical-threshold": 42, "format": "{temperatureC}°C 󰞍", "on-click-right": "foot -a popup /usr/local/bin/fan2go-tui" }, "temperature#cpu": { - "hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input", + "hwmon-path": "/dev/sensors/k10temp/temp1_input", "critical-threshold": 95, "format": "{temperatureC}°C " }, "temperature#board": { - "hwmon-path": "/sys/class/hwmon/hwmon4/temp1_input", + "hwmon-path": "/dev/sensors/nct6799/temp1_input", "critical-threshold": 85, "format": "{temperatureC}°C 󰇅" }, "temperature#gpu": { - "hwmon-path": "/sys/class/drm/card0/device/hwmon/hwmon6/temp2_input", + "hwmon-path": "/dev/sensors/gpudedicated/temp1_input", "critical-threshold": 110, "format": "{temperatureC}°C 󰍹" }, -- 2.51.2