

I have used xss-lock
with i3lock
in the past with success. It makes sure that systemd-logind notifies over dbus when entering hibernation so that xss-lock
starts the configured lockscreen.
Before that I had a script which locks manually and then calls systemctl hibernate
.
Currently I am on Gnome, but I want to transition back to a more minimalistic DE like niri. Then I have to look on the options again to reliably lock my screen.
This looks a bit like borgbackup. It is also versioned and stores everything deduplicated, supports encryption and can be mounted using fuse.