aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2023-02-17 22:43:39 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2023-02-17 22:43:39 -0500
commitbf0942a5098593f1f0f60dea0c9a578d38d03180 (patch)
treedba43222898cbd59e257d6cc5c92a02d656df64e
parent97a53d8899797c8a504d015d0129f3c513bdddf3 (diff)
downloaddotfiles-bf0942a5098593f1f0f60dea0c9a578d38d03180.tar.gz
dotfiles-bf0942a5098593f1f0f60dea0c9a578d38d03180.tar.xz
Add a mouse props script. Also add a few arch linux packages
-rw-r--r--arch-pkgs5
-rw-r--r--bin/mouse-props31
2 files changed, 35 insertions, 1 deletions
diff --git a/arch-pkgs b/arch-pkgs
index 6a23c53..5ca62a1 100644
--- a/arch-pkgs
+++ b/arch-pkgs
@@ -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
+