mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-18 00:18:19 +02:00
xlock: lock screen faster by invoking i3lock directly
Instead of trying to mess with xautolock to trigger locking, just invoke i3lock directly.
This commit is contained in:
parent
ebfdad5021
commit
51525044ae
3 changed files with 7 additions and 2 deletions
3
bin/locker
Executable file
3
bin/locker
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
exec i3lock -n -i $HOME/.cache/awesome/current-wallpaper.png
|
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
icon="$1"
|
icon="$1"
|
||||||
notify=$(dirname $(readlink -f "$0"))/notify-lock
|
notify=$(dirname $(readlink -f "$0"))/notify-lock
|
||||||
|
locker=$(dirname $(readlink -f "$0"))/locker
|
||||||
|
|
||||||
exec xautolock \
|
exec xautolock \
|
||||||
-time 4 \
|
-time 4 \
|
||||||
-locker "i3lock -n -i $HOME/.cache/awesome/current-wallpaper.png" \
|
-locker "$locker" \
|
||||||
-notify 10 \
|
-notify 10 \
|
||||||
-notifier "$notify $icon"
|
-notifier "$notify $icon"
|
||||||
|
|
|
@ -11,7 +11,8 @@ config.keys.global = awful.util.table.join(
|
||||||
config.keys.global,
|
config.keys.global,
|
||||||
awful.key({}, "XF86ScreenSaver",
|
awful.key({}, "XF86ScreenSaver",
|
||||||
function()
|
function()
|
||||||
awful.util.spawn_with_shell("xautolock -locknow & sleep 1 ; xautolock -enable ; sleep 1 ; xautolock -locknow", false)
|
awful.util.spawn(awful.util.getdir("config") ..
|
||||||
|
"/bin/locker", false)
|
||||||
end))
|
end))
|
||||||
|
|
||||||
-- Configure DPMS
|
-- Configure DPMS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue