-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathG29Config
More file actions
executable file
·29 lines (27 loc) · 890 Bytes
/
G29Config
File metadata and controls
executable file
·29 lines (27 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
usboutput=$(lsusb -d 046d:c29b)
if [[ -z $usboutput ]]
then
usboutput=$(lsusb -d 046d:c24f)
if [[ -z $usboutput ]]
then
zenity --error --text "Please connect the G29 wheel with your computer and try again!"
exit 1
fi
path=`find /sys/devices -name alternate_modes`
echo G27 > ${path}
(
echo "12"; sleep 1
echo "24"; sleep 1
echo "36"; sleep 1
echo "48"; sleep 1
echo "60"; sleep 1
echo "72"; sleep 1
echo "84"; sleep 1
echo "96"; sleep 1
echo "100"; sleep 1
) |zenity --progress --text "Waiting for wheel to finish calibrating/switching" --auto-close --percentage=0 #wait until the wheel is switched to G27 mode
fi
newrange=$(zenity --entry --title "Please provide a range input for your wheel" --text "New Range")
path=`find -L /sys/bus/hid/drivers/logitech -ignore_readdir_race -maxdepth 2 -name range 2> /dev/null`
echo $newrange > ${path}