fixed tooltips and broken razer mouse script

This commit is contained in:
2025-07-09 16:38:16 +02:00
parent c51a3ada60
commit 37fe2f72ad
2 changed files with 25 additions and 7 deletions

View File

@@ -2,7 +2,13 @@
# Path to your Razer HID battery info
#BASE="/sys/bus/hid/drivers/razermouse/0003:1532:00AB.000A"
BASE_MOUSE="/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/usb1/1-8/1-8.1/1-8.1.2/1-8.1.2:1.0/0003:1532:00AB.0009"
#BASE_MOUSE="/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/usb1/1-8/1-8.1/1-8.1.2/1-8.1.2:1.0/0003:1532:00AB.0009"
BASE_MOUSE=''
# autodetect the razermouse sysfs folder that contains charge_level
for d in /sys/bus/hid/drivers/razermouse/*; do
[[ -f $d/charge_level ]] && { BASE_MOUSE=$d; break; }
done
# Read raw level and charging status
raw=$(cat "$BASE_MOUSE/charge_level")