Cleanup dead 1pw lock instances
This commit is contained in:
@@ -10,9 +10,13 @@ omarchy-shell lock lock >/dev/null
|
|||||||
# Set keyboard layout to default (first layout)
|
# Set keyboard layout to default (first layout)
|
||||||
hyprctl switchxkblayout all 0 > /dev/null 2>&1
|
hyprctl switchxkblayout all 0 > /dev/null 2>&1
|
||||||
|
|
||||||
# Ensure 1password is locked
|
# Ensure 1password is locked. Use timeout because `1password --lock` can
|
||||||
if pgrep -x "1password" >/dev/null; then
|
# otherwise leave a full Electron helper tree running after each lock.
|
||||||
1password --lock &
|
if pgrep -x "1password" >/dev/null && command -v 1password >/dev/null 2>&1; then
|
||||||
|
(
|
||||||
|
flock -n 9 || exit 0
|
||||||
|
timeout --kill-after=1s 3s 1password --lock >/dev/null 2>&1 || true
|
||||||
|
) 9>"${XDG_RUNTIME_DIR:-/tmp}/omarchy-1password-lock.lock" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Avoid running screensaver when locked
|
# Avoid running screensaver when locked
|
||||||
|
|||||||
Reference in New Issue
Block a user