summaryrefslogtreecommitdiffstats
path: root/bin/dpmsmouse
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-04-25 19:05:57 (EDT)
committer P. J. McDermott <pj@pehjota.net>2018-04-25 19:05:57 (EDT)
commit39b652f01e0aa88071b387f0262eeab2614b8eda (patch)
treebe47fbf91d2457a56337a22c5c1b050b1f68a908 /bin/dpmsmouse
parentc2321700028b7e3b2cae4015f3194e658977c9e0 (diff)
downloadfluxbox-39b652f01e0aa88071b387f0262eeab2614b8eda.zip
fluxbox-39b652f01e0aa88071b387f0262eeab2614b8eda.tar.gz
fluxbox-39b652f01e0aa88071b387f0262eeab2614b8eda.tar.bz2
bin/dpmsmouse: Don't crash if device not found on state change
If the mouse is unplugged when the state changes, this is a fatal error: unable to find device Logitech USB-PS/2 Optical Mouse
Diffstat (limited to 'bin/dpmsmouse')
-rwxr-xr-xbin/dpmsmouse4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dpmsmouse b/bin/dpmsmouse
index a9ebf09..229b9e6 100755
--- a/bin/dpmsmouse
+++ b/bin/dpmsmouse
@@ -34,7 +34,7 @@ enable_devices()
dbg 'Enabling devices:'
for device in "${@}"; do
dbg ' %s' "${device}"
- xinput --enable "${device}"
+ xinput --enable "${device}" || :
done
}
@@ -45,7 +45,7 @@ disable_devices()
dbg 'Disabling devices:'
for device in "${@}"; do
dbg ' %s' "${device}"
- xinput --disable "${device}"
+ xinput --disable "${device}" || :
done
}