summaryrefslogtreecommitdiff
path: root/lock
diff options
context:
space:
mode:
authortslil clingman <>2021-01-24 20:23:19 -0500
committertslil clingman <>2021-01-24 20:23:19 -0500
commit3c79bbc4529f62d462f6807f354b6b4c5e3477e6 (patch)
tree3df4f41d1a19eb0e48e60d75f580ff1d8d47b093 /lock
parent515c31a1f08d7ba500bf7261d7018a250dfd9779 (diff)
parent92f24df41be941d407965368a9c84b7f061fddb8 (diff)
Merge branch 'master' of git.sr.ht:~tslil/scripts
Diffstat (limited to 'lock')
-rwxr-xr-xlock15
1 files changed, 11 insertions, 4 deletions
diff --git a/lock b/lock
index d8e4489..3134405 100755
--- a/lock
+++ b/lock
@@ -1,8 +1,15 @@
#!/usr/bin/env sh
+
+# Clear keys
killall -s HUP gpg-agent
keychain --clear
-xset dpms force off
+
+# We want powersaving now that screen is locked
+xset +dpms
+sleep 1; xset dpms force off
+
+# Lock
slock
-fix_backlight
-xset s off
-xest -dpms
+
+# Clean up on exit
+trap "xset -dpms" EXIT