Add script for auto-retry on device loss
This commit is contained in:
parent
c29a3b5e91
commit
fd7421254e
3 changed files with 21 additions and 9 deletions
|
@ -12,12 +12,12 @@ Largely based on [systemofapwne/leetmouse](https://github.com/systemofapwne/leet
|
||||||
- `cargo install --path .`
|
- `cargo install --path .`
|
||||||
- `evdev-accel --help`
|
- `evdev-accel --help`
|
||||||
|
|
||||||
See [examples/evdev-accel.desktop](examples/evdev-accel.desktop) for XDG desktop entry.
|
See [examples/evdev-accel-service.sh](examples/evdev-accel-service.sh) for auto-retry on device loss.
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
|
- XDG desktop entry -- I couldn't get one to work on login, only with manual exec after login
|
||||||
- Add default config if no cfg file
|
- Add default config if no cfg file
|
||||||
- Retry on device loss
|
|
||||||
- Min/Max accel settings
|
- Min/Max accel settings
|
||||||
- Accel offset
|
- Accel offset
|
||||||
- Different accel curves
|
- Different accel curves
|
||||||
|
|
19
examples/evdev-accel-service.sh
Executable file
19
examples/evdev-accel-service.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Script for running evdev-accel again on device loss
|
||||||
|
#
|
||||||
|
|
||||||
|
DEVICE="Your device name here"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
evdev-accel -d "$DEVICE"
|
||||||
|
ex="$?"
|
||||||
|
if [ $ex = 0 ]; then
|
||||||
|
echo "evdev-accel exited with code 0, quitting"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "evdev-accel exited with code $ex, retrying in 1 second"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Exec=evdev-accel -d "Your Device Here"
|
|
||||||
Name=evdev-accel
|
|
||||||
Comment=Start evdev-accel
|
|
||||||
GenericName=Mouse Acceleration
|
|
||||||
Terminal=false
|
|
Loading…
Add table
Add a link
Reference in a new issue