From 3d1de55b4a7d28699528f46a6cf07b3079b77749 Mon Sep 17 00:00:00 2001 From: Blista Kanjo Date: Fri, 14 Jul 2023 03:08:32 -0400 Subject: refactor: move `awesome` scripts to `~/.local/bin` --- .local/bin/awesome-xinputD | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 .local/bin/awesome-xinputD (limited to '.local/bin/awesome-xinputD') diff --git a/.local/bin/awesome-xinputD b/.local/bin/awesome-xinputD new file mode 100755 index 0000000..153a5b4 --- /dev/null +++ b/.local/bin/awesome-xinputD @@ -0,0 +1,22 @@ +#!/bin/sh + +apply_settings() { + sleep 2 + xinput set-prop pointer:"Logitech USB Trackball" "libinput Natural Scrolling Enabled" 1 + xinput set-prop pointer:"Logitech USB Trackball" "libinput Accel Speed" 1.000000 + xinput set-prop pointer:"SteelSeries SteelSeries Rival 310 eSports Mouse" "libinput Accel Speed" 0.300000 + xinput set-prop pointer:"ELECOM ELECOM TrackBall Mouse" "libinput Accel Speed" 0.300000 + xinput set-prop pointer:"Logitech M705" "libinput Accel Speed" 1.000000 + if [ -f ~/.Xmodmap ]; then xmodmap ~/.Xmodmap; fi +} + +apply_settings + +while true; do + state=$(lsusb) + sleep 2 + + if [ "$state" != "$(lsusb)" ]; then + apply_settings + fi +done -- cgit v1.2.3