Files
arthur-os/bin/omarchy-system-lock
T

20 lines
481 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Lock the computer and turn off the display
# omarchy:group=system
# omarchy:name=lock
# omarchy:examples=omarchy system lock
omarchy-shell lock lock >/dev/null
# Set keyboard layout to default (first layout)
hyprctl switchxkblayout all 0 > /dev/null 2>&1
# Ensure 1password is locked
if pgrep -x "1password" >/dev/null; then
1password --lock &
fi
# Avoid running screensaver when locked
pkill -f '[o]rg.omarchy.screensaver' 2>/dev/null || true