diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-09-09 11:24:19 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-09-09 11:24:19 +0530 |
| commit | 445ae385cfd93eae2a0402a5ffe20378488dee7e (patch) | |
| tree | 92fff33bb02598451cb74359c1f61a3b6c1f6c87 /scripts | |
| parent | e8950c9645a064b7bb5ba09deb59c60a1e9cf19e (diff) | |
vnc undo, left hand mode script, new functionality in nvim & attempts to fix some suspend issue
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/left-mode.sh | 19 | ||||
| -rwxr-xr-x | scripts/unsetup-vnc-monitor.sh | 19 | ||||
| -rwxr-xr-x | scripts/vnc.sh | 1 |
3 files changed, 39 insertions, 0 deletions
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 diff --git a/scripts/unsetup-vnc-monitor.sh b/scripts/unsetup-vnc-monitor.sh new file mode 100755 index 0000000..8eaa494 --- /dev/null +++ b/scripts/unsetup-vnc-monitor.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -euo pipefail + +export DISPLAY=:0 + +# Remove the monitors created by the original script. +xrandr --delmonitor PHYSICAL 2>/dev/null || true +xrandr --delmonitor VNC 2>/dev/null || true + +# Remove any leftover monitor definitions from previous runs. +xrandr --delmonitor VNC-0 2>/dev/null || true +xrandr --delmonitor VNC-1 2>/dev/null || true +xrandr --delmonitor VNC-2 2>/dev/null || true + +# Restore the framebuffer to the physical display's resolution. +xrandr --fb 1920x1080 + +xrandr --listmonitors diff --git a/scripts/vnc.sh b/scripts/vnc.sh index ad9fefd..223382f 100755 --- a/scripts/vnc.sh +++ b/scripts/vnc.sh @@ -15,6 +15,7 @@ cleanup() { trap cleanup INT TERM EXIT Xvnc :1 \ + -rfbport 5900 :1 \ -geometry 1920x1080 \ -depth 24 \ -rfbauth ~/.config/vnc/passwd & |
