diff options
| -rw-r--r-- | arch-pkgs | 5 | ||||
| -rw-r--r-- | bin/mouse-props | 31 |
2 files changed, 35 insertions, 1 deletions
@@ -98,5 +98,8 @@ ntfs-3g pv exfat-utils zstd -bind-utils +bind evince +nload +iotop +hdparm diff --git a/bin/mouse-props b/bin/mouse-props new file mode 100644 index 0000000..94a151e --- /dev/null +++ b/bin/mouse-props @@ -0,0 +1,31 @@ +#!/bin/sh + +mice="$(xinput list --name-only | grep -E 'Logitech G305' )" + +proplist='Accel Profile Enabled::0 1 +Accel Speed::-0.7' + +IFS=' +' + +for device in $mice ; do + props=$(xinput --list-props "pointer:$device") + + for prop in $proplist ; do + propName="$(echo "$prop" | awk -F:: '{print $1}')" + propVal="$(echo "$prop" | awk -F:: '{print $2}')" + + prop="$(echo "$props" | + sed -rne 's/^.*'"$propName"' \(([0-9]+).*$/\1/ip')" + oldIFS="$IFS" + IFS=' ' + + #shellcheck disable=SC2086 + xinput --set-prop "pointer:$device" "$prop" $propVal + #shellcheck disable=SC2086 + echo xinput --set-prop "pointer:$device" "$prop" $propVal + + IFS="$oldIFS" + done +done + |
