mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-21 17:33:11 -05:00
22 lines
461 B
Bash
22 lines
461 B
Bash
#!/bin/sh
|
|
|
|
user=$(id -u)
|
|
time=$(date +"%b %d, %Y %T")
|
|
log_file=$XDG_STATE_HOME/waylock.log
|
|
|
|
echo "--- $time ---" > "$log_file"
|
|
|
|
if pgrep -u "$user" -x waylock >/dev/null; then
|
|
echo "error: waylock is already running" >> "$log_file"
|
|
exit 1
|
|
else
|
|
waylock \
|
|
-fork-on-lock \
|
|
-log-level debug \
|
|
-ignore-empty-password \
|
|
-init-color 0x000000 \
|
|
-fail-color 0x000000 \
|
|
-input-color 0x525c62 \
|
|
2>&1 | tee -a "$log_file" >/dev/null &
|
|
fi
|
|
|