After recently switching to i3 in Arch, I need something to manage power.
xautolock seemed to be a good choice.
Unfortunately, I need it to do both
systemctl suspend and
i3lock at the same time, but it cannot achieve that.
exec_always xautolock -time 3 -locker "i3lock && systemctl suspend"
That does not work at all, after i3lock is triggered, suspend won't happen.
Interesting though, the fact that this:
bindsym $mod+Control+s exec --no-startup-id i3lock && systemctl suspend
Actually works, after pressing the binding, i3locks screen and system is suspended.
Please let me know if xautolock can achieve the same thing, and what options will I need to add in order for it to work.
Thank you for taking the time for a look!
And just as a side note,
exec_always xautolock -time 3 -locker “systemctl suspend”
Works, but it only suspends machine and not lock it.