Initial low vision features added. xzoom needs to be installed for magnification. This first implementation is probably terrible, feedback welcome for improvement. Screen lock can now happen when I38 starts. As a reminder, it's not as secure as one of the system lockers, but it is screen reader accessible and should keep casual snoopers thwarted.

This commit is contained in:
Storm Dragon committed 2026-05-20 03:25:28 -04:00
1 parent 7ef49290ea
commit 1a2252d8de
5 files changed
+158 -22

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Move the mouse pointer to the center of the focused window.
if ! command -v xdotool &> /dev/null; then
if command -v notify-send &> /dev/null; then
notify-send "I38" "xdotool is required to move the mouse pointer."
fi
exit 1
fi
activeWindow="$(xdotool getactivewindow 2> /dev/null || true)"
if [[ "$activeWindow" =~ ^[0-9]+$ ]]; then
while IFS='=' read -r key value; do
case "$key" in
X|Y|WIDTH|HEIGHT)
if [[ "$value" =~ ^-?[0-9]+$ ]]; then
printf -v "$key" '%s' "$value"
fi
;;
esac
done < <(xdotool getwindowgeometry --shell "$activeWindow" 2> /dev/null || true)
fi
if [[ "${X:-}" =~ ^-?[0-9]+$ ]] &&
[[ "${Y:-}" =~ ^-?[0-9]+$ ]] &&
[[ "${WIDTH:-}" =~ ^[0-9]+$ ]] &&
[[ "${HEIGHT:-}" =~ ^[0-9]+$ ]] &&
[[ "$WIDTH" -gt 0 ]] &&
[[ "$HEIGHT" -gt 0 ]]; then
pointerX=$((X + WIDTH / 2))
pointerY=$((Y + HEIGHT / 2))
else
read -r displayWidth displayHeight < <(xdotool getdisplaygeometry)
pointerX=$((displayWidth / 2))
pointerY=$((displayHeight / 2))
fi
xdotool mousemove "$pointerX" "$pointerY"