mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-22 01:43:10 -05:00
20 lines
396 B
Bash
20 lines
396 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 \
|
|
-init-color 0x000000 \
|
|
-fail-color 0x000000 \
|
|
-input-color 0x525c62 \
|
|
2>&1 | tee -a "$log_file"
|
|
fi
|
|
|