From 24fff7a3ceac1dfaa19518ba806f36a019e9273b Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Mon, 19 Oct 2020 10:33:54 -0400 Subject: Tracking my Qubes DWM configuration --- qubes-dwm-6.2/scripts/toggle_autolock | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 qubes-dwm-6.2/scripts/toggle_autolock (limited to 'qubes-dwm-6.2/scripts/toggle_autolock') diff --git a/qubes-dwm-6.2/scripts/toggle_autolock b/qubes-dwm-6.2/scripts/toggle_autolock new file mode 100755 index 0000000..8adff84 --- /dev/null +++ b/qubes-dwm-6.2/scripts/toggle_autolock @@ -0,0 +1,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 -- cgit v1.2.3