Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bin/omarchy-screensaver
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ screensaver_in_focus() {
exit_screensaver() {
hyprctl eval 'hl.config({ cursor = { invisible = false } })' &>/dev/null || hyprctl keyword cursor:invisible false &>/dev/null || true
pkill -x ttfx 2>/dev/null
printf '\033[?1007h\033[?1049l' # Restore wheel scrolling and the normal screen
Comment thread
cornedor marked this conversation as resolved.
Resolved
pkill -f '[o]rg.omarchy.screensaver' 2>/dev/null
exit 0
}

# Exit the screensaver on signals and input from keyboard and mouse
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT

printf '\033[?1049h' # Draw on the alternate screen, which has no scrollback to scroll
printf '\033[?1007l' # Don't turn mouse wheel scrolls into arrow keys
printf '\033]11;rgb:00/00/00\007' # Set background color to black
stty -echo 2>/dev/null # Don't echo the key that stops the screensaver into the corner

Expand Down