diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2023-02-17 22:43:39 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2023-02-17 22:43:39 -0500 |
| commit | bf0942a5098593f1f0f60dea0c9a578d38d03180 (patch) | |
| tree | dba43222898cbd59e257d6cc5c92a02d656df64e | |
| parent | 97a53d8899797c8a504d015d0129f3c513bdddf3 (diff) | |
| download | dotfiles-bf0942a5098593f1f0f60dea0c9a578d38d03180.tar.gz dotfiles-bf0942a5098593f1f0f60dea0c9a578d38d03180.tar.xz | |
Add a mouse props script. Also add a few arch linux packages
| -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 + |
