]> Freerunner's - dotfiles.git/commitdiff
waybar: use customized udev paths for sensors applet because the kernel...
authorAndre Ramnitz <tux.rising@gmail.com>
Sat, 26 Oct 2024 15:53:09 +0000 (17:53 +0200)
committerAndre Ramnitz <tux.rising@gmail.com>
Sat, 26 Oct 2024 15:53:09 +0000 (17:53 +0200)
...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

index 5a4cb62de72800a7a1c3f25d2e4f1b93b0d0f8a1..ca72ce4476ccd49af5059de7d77dd12a58c5aa58 100644 (file)
     "interval": 1
   },
   "temperature#water": {
-    "hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input",
+    "hwmon-path": "/dev/sensors/aquastream/temp2_input",
     "critical-threshold": 42,
     "format": "<span color='#efefef'>{temperatureC}°C</span> 󰞍",
     "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": "<span color='#efefef'>{temperatureC}°C</span> "
   },
   "temperature#board": {
-    "hwmon-path": "/sys/class/hwmon/hwmon4/temp1_input",
+    "hwmon-path": "/dev/sensors/nct6799/temp1_input",
     "critical-threshold": 85,
     "format": "<span color='#efefef'>{temperatureC}°C</span> 󰇅"
   },
   "temperature#gpu": {
-    "hwmon-path": "/sys/class/drm/card0/device/hwmon/hwmon6/temp2_input",
+    "hwmon-path": "/dev/sensors/gpudedicated/temp1_input",
     "critical-threshold": 110,
     "format": "<span color='#efefef'>{temperatureC}°C</span> 󰍹"
   },