From 445ae385cfd93eae2a0402a5ffe20378488dee7e Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Wed, 9 Sep 2026 11:24:19 +0530 Subject: vnc undo, left hand mode script, new functionality in nvim & attempts to fix some suspend issue --- scripts/left-mode.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/left-mode.sh (limited to 'scripts/left-mode.sh') diff --git a/scripts/left-mode.sh b/scripts/left-mode.sh new file mode 100755 index 0000000..b5c8a22 --- /dev/null +++ b/scripts/left-mode.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -euo pipefail + +device_id=$( + xinput list | + grep -i 'Optical Mouse' | + sed -n 's/.*id=\([0-9]\+\).*/\1/p' | + head -n 1 +) + +if [[ -z "$device_id" ]]; then + echo "Error: No device matching 'Optical Mouse' found." >&2 + exit 1 +fi + +echo "Found Optical Mouse with ID: $device_id" + +xinput set-prop "$device_id" "libinput Left Handed Enabled" 1 -- cgit v1.2.3