Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2018-07-29 15:11:03 +03:00
parent a19db08791
commit cf2c2e7645
22 changed files with 46 additions and 206 deletions

View File

@@ -1,30 +0,0 @@
#!/usr/bin/env ssm
# vim: ft=sh
service_respawn='true'
service_command="$HOME/bin/lockd"
service_args=( i3lock-extra -s -o ~/pics/lock.png -g -p )
function _lock {
kill -USR1 "$service_pid"
}
function lock {
status || {
start; sleep 1
"$0" "$service_name" lock
return "$?"
}
_lock
}
function toggle {
if status; then
out=$( "$0" "$service_name" stop 2>&1 )
notify-send "ssm" "$out"
else
out=$( "$0" "$service_name" start 2>&1 )
notify-send "ssm" "$out"
fi
}