waybar_fix.sh 305 B

1234567
  1. #!/bin/sh
  2. dry="-i"
  3. [ "$1" = "test" ] && dry=""
  4. if [ -d /sys/class/hwmon/hwmon0 ];then
  5. sed -s "/hwmon-path/c\"hwmon-path\": \"$(ls /sys/class/hwmon/hwmon$(grep -ri "coretemp\|k8temp" /sys/class/hwmon/hwmon*/name | cut -d: -f1 | tr -dc '0-9')/temp*_input | head -n1)\"," $dry ~/.config/waybar/config
  6. fi