tileos-settings-niri/usr/share/niri/scripts/lock.sh
2025-06-06 14:55:07 +04:00

15 lines
485 B
Bash
Executable file

#!/bin/bash
# Swaylock run's with additional features, e.g. adding screenshot to background
SWAYLOCK_USER_SCRIPT="$HOME/.config/swaylock/lock.sh"
SWAYLOCK_GLOB_SCRIPT="/usr/share/niri/scripts/swaylock.sh"
if [ -x "$(command -v gtklock)" ]; then
gtklock --daemonize --follow-focus --idle-hide --start-hidden
elif [ -x "$(command -v swaylock)" ]; then
if [[ -x "$SWAYLOCK_USER_SCRIPT" ]]; then
"$SWAYLOCK_USER_SCRIPT"
else
"$SWAYLOCK_GLOB_SCRIPT"
fi
fi