lock.sh: use DMS lock screen with swaylock fallback

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 10:38:31 +05:00
co-authored by Claude Sonnet 5.5
parent fc24a050f1
commit 40a3207978
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -1,6 +1,10 @@
#!/bin/sh
# Lock with swaylock-effects (blur + clock) if installed, else plain swaylock.
# Lock with DankMaterialShell (matches the shell theme). Fall back to swaylock-effects / swaylock
# when DMS is not running or the IPC call fails.
pgrep -x swaylock >/dev/null && exit 0
if pgrep -x dms >/dev/null && timeout 3 dms ipc call lock lock >/dev/null 2>&1; then
exit 0
fi
fx=$HOME/.local/bin/swaylock-effects
if [ -x "$fx" ]; then
exec "$fx" -f -C "$HOME/.config/swaylock/config-effects"