lightdm
login manager then there is a nice way to make it in the following manner:
# install the light locker (for arch-based distros)
yay light-locker
# add the following lines to your ~/.config/i3/config
exec_always --no-startup-id /usr/bin/light-locker
bindsym $mod+l exec --no-startup-id light-locker-command --lock
The last line is needed to be able to lock the screen with $mod+l
combination. My $mod=Win
, so I get to lock my screen with Win+l
.
What I like about this approach is that it brings you to the lightdm login window, which is how I expected the locking to behave before I started using i3.