mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Canceling the screensaver on mouse movement doesn't work with bluetooth mice
Could not get it to stop existing with a Logitech MX4 when connected via bluetooth.
This commit is contained in:
@@ -13,8 +13,6 @@ exit_screensaver() {
|
|||||||
|
|
||||||
# Exit the screensaver on signals and input from keyboard and mouse
|
# Exit the screensaver on signals and input from keyboard and mouse
|
||||||
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
|
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
|
||||||
printf '\e[?1000h\e[?1003h' # Enable mouse tracking (clicks: 1000, movement: 1003)
|
|
||||||
while read -rsn1 -t 0.1; do :; done # Flush any pending input
|
|
||||||
|
|
||||||
printf '\033]11;rgb:00/00/00\007' # Set background color to black
|
printf '\033]11;rgb:00/00/00\007' # Set background color to black
|
||||||
|
|
||||||
@@ -29,7 +27,7 @@ while true; do
|
|||||||
--no-eol --no-restore-cursor &
|
--no-eol --no-restore-cursor &
|
||||||
|
|
||||||
while pgrep -t "${tty#/dev/}" -x tte >/dev/null; do
|
while pgrep -t "${tty#/dev/}" -x tte >/dev/null; do
|
||||||
if read -rsn1 -t 1 || ! screensaver_in_focus; then
|
if read -n1 -t 1 || ! screensaver_in_focus; then
|
||||||
exit_screensaver
|
exit_screensaver
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user