I recently got into the i3 ecosystem and am starting to configure it. I noticed that the system does not auto lock and suspend like Gnome would do after certain amount of idle time. What would be your way to configure Arch Linux with i3 running to auto lock and suspend after certain period of idling?
To control power-related stuff (like suspend, laptop lid closing, etc) you need to start some power management tool, e.g. you could use
mate-power-manager from MATE. Add it to your i3 config file and configure using
Power Management application:
# ~/.config/i3/config exec --no-startup-id mate-power-manager
For screen lock you could use
i3lock-fancy. Add it to i3 config:
# ~/.config/i3/config exec xautolock -time 30 -locker '&& i3lock-fancy -p' -notify 30 -notifier "notify-send -u critical -t 10000 -- 'LOCKING screen in 30 seconds'"
Above command will lock you screen after 30 minutes of inactivity with blurred screenshot of you current screen (also showing you warning 30 seconds before that).
So thanks to anlar we have a solution to the problem, the tool
mate-power-manager can suspend the system automatically, and
xautolock, which triggers a locking mechanism actually locks your computer. My take on this was to just use the
i3lock, as its simple functions were more than enough for me. But if you do want the fancier appearance, do use the
In any case, below are references to this subject and other alternatives:
Thanks for reading, hope this will help others out.