blob: 8adff8414c98e45ed80e7e63115d0a85a8c7e8f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/sh
#pid="$(pgrep xautolock)"
#if [ -n "$pid" ]; then
# kill $pid
# xautolock -detectsleep -time 5 -locker 'loginctl lock-session' -notify 30 -notifier "notify-send -t 2000 'Locking screen in 30 seconds'" &
if [ -z "$(cat ~/.autolock_status)" ]; then
xset s off
echo "🔓! | " > ~/.autolock_status
notify-send 'Autolock DISABLED'
else
xset s 300
echo "" > ~/.autolock_status
notify-send 'Autolock enabled'
fi
|