summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-02-01 22:23:13 -0500
committerBen Sima <ben@bsima.me>2022-02-01 22:23:13 -0500
commitd61fc3da96fb2cbc44f39f58ad6bbfe7001b6c81 (patch)
tree94e150e90b8ad974a814d5459055fe7d90576bd0 /lib
parent3c98890752eeb27730a42514cfc2cc5d90cf7c9f (diff)
lock when yubikey is removed
Took me forever but I figured out how to use udev rules to give xautolock permission to see the yubi when unlocking. Also triggers a systemd service that locks the screen when yubi is removed. I couldn't do this directly in a udev RUN becaues udev sucks at running programs as different users and with environment variables and such. This is still a bit buggy, I seem to consistently need to authenticate twice when unlocking, but I think that would be fixed if I get rid of the serviceConfig.User thing with some fancy scripting. And as a backup, added Super+Shift+L for manual locking.
Diffstat (limited to 'lib')
-rw-r--r--lib/xmonad.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/xmonad.hs b/lib/xmonad.hs
index 945cdac..a4c6e65 100644
--- a/lib/xmonad.hs
+++ b/lib/xmonad.hs
@@ -88,6 +88,9 @@ insKeys conf@(XConfig {modMask = modMask}) =
]
),
+ -- lock it up
+ ( (modMask .|. shiftMask, xK_l), spawn "xautolock -locknow"),
+
-- sticky windows
((modMask, xK_a), windows copyToAll), -- @@ Make focused window always visible
((modMask .|. shiftMask, xK_a), killAllOtherCopies), -- @@ Toggle window state back