Prevent maching the check causing spontaneous locking

This commit is contained in:
Ryan Hughes
2026-05-19 21:01:15 -04:00
parent ad271c1fcb
commit 26281b3863
4 changed files with 95 additions and 60 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ if ! command -v tte &>/dev/null; then
exit 1
fi
# Exit early if screensave is already running
pgrep -f org.omarchy.screensaver && exit 0
# Exit early if screensaver is already running
pgrep -f '[o]rg.omarchy.screensaver' && exit 0
# Allow screensaver to be turned off but also force started
if omarchy-toggle-enabled screensaver-off && [[ $1 != "force" ]]; then
+1 -1
View File
@@ -9,7 +9,7 @@ screensaver_in_focus() {
exit_screensaver() {
hyprctl eval 'hl.config({ cursor = { invisible = false } })' &>/dev/null || hyprctl keyword cursor:invisible false &>/dev/null || true
pkill -x tte 2>/dev/null
pkill -f org.omarchy.screensaver 2>/dev/null
pkill -f '[o]rg.omarchy.screensaver' 2>/dev/null
exit 0
}
+1 -1
View File
@@ -16,4 +16,4 @@ if pgrep -x "1password" >/dev/null; then
fi
# Avoid running screensaver when locked
pkill -f '[o]rg.omarchy.screensaver'
pkill -f '[o]rg.omarchy.screensaver' 2>/dev/null || true