My ubuntu setup with i3 window manager.
$ sudo apt update && sudo apt install i3
Relog with i3.
Install i3lock-fancy
$ git clone https://github.com/meskarune/i3lock-fancy.git ~/.scripts/i3lock-fancy
$ cd ~/.scripts/i3lock-fancy
$ sudo make install
Set service to lock screen after suspend/sleep
$ sudo mv lockscreen.service /etc/systemd/system/
$ sudo systemctl enable screenlock.service
$ sudo apt install xclip imagemagic