vincentbernat.i3wm-configur.../rc/xlock.lua
Vincent Bernat 27c5c4deee xlock: really lock the screen
xautolock only reads its messages once per second. It can only
receives one message. So, if we send "enable" and "locknow", "locknow"
erases "enable". Try to be smarter.
2013-08-20 15:20:28 +02:00

18 lines
551 B
Lua

-- Lockscreen
local icons = loadrc("icons", "vbe/icons")
xrun("xautolock",
awful.util.getdir("config") ..
"/bin/xautolock " ..
icons.lookup({name = "system-lock-screen", type = "actions" }))
config.keys.global = awful.util.table.join(
config.keys.global,
awful.key({}, "XF86ScreenSaver",
function()
awful.util.spawn_with_shell("xautolock -locknow & sleep 1 ; xautolock -enable ; sleep 1 ; xautolock -locknow", false)
end))
-- Configure DPMS
os.execute("xset dpms 360 720 1200")