diff --git a/bin/locker b/bin/locker new file mode 100755 index 0000000..d7c731a --- /dev/null +++ b/bin/locker @@ -0,0 +1,3 @@ +#!/bin/sh + +exec i3lock -n -i $HOME/.cache/awesome/current-wallpaper.png diff --git a/bin/xautolock b/bin/xautolock index a3337e1..21e4f1d 100755 --- a/bin/xautolock +++ b/bin/xautolock @@ -2,9 +2,10 @@ icon="$1" notify=$(dirname $(readlink -f "$0"))/notify-lock +locker=$(dirname $(readlink -f "$0"))/locker exec xautolock \ -time 4 \ - -locker "i3lock -n -i $HOME/.cache/awesome/current-wallpaper.png" \ + -locker "$locker" \ -notify 10 \ -notifier "$notify $icon" diff --git a/rc/xlock.lua b/rc/xlock.lua index b72053c..6e14cd7 100644 --- a/rc/xlock.lua +++ b/rc/xlock.lua @@ -11,7 +11,8 @@ 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) + awful.util.spawn(awful.util.getdir("config") .. + "/bin/locker", false) end)) -- Configure DPMS