dotfiles/homedir/.config/ssm/services/lockd
fbt dc36432cac too much shit to say
Signed-off-by: fbt <fbt@fleshless.org>
2019-10-03 12:03:31 +03:00

25 lines
515 B
Bash
Executable File

#!/usr/bin/env ssm
# vim: ft=sh
service_respawn = always
service_command = "$HOME/bin/lockd" i3lock-extra -s -o ~/pics/lock.png -p -g -- -e -f
function pre_start {
notify-send 'ssm' "Starting $service_name; press again to lock."
}
function start_or_lock {
if ! status; then
"$0" "$service_name" start
else
"$0" "$service_name" lock
fi
}
function pre_lock { notify-send 'ssm' "Locking..."; }
function lock { kill -USR1 "$service_pid"; }
function pre_stop {
notify-send 'ssm' "Stopping $service_name"
}