Lock Screen and Hibernate

I’d like to make buttons which are lock screen and hibernate (which will ask later passwords).
What is simple and light programs to make these options? xscreensaver requires to install
a lot of libs. I use standard config of fvwm.

I have started using i3lock + xautolock for my lock screen. It is a simple lock screen that is standalone (even though it was designed for i3).

With hibernate, you should be able to configure a trigger on your os to run i3lock when it is being put sleep.

Thanks. I started i3lock -c 000000 -n, works well. Could you explain i3lock + xautolock?

xautolock is a program that runs any script you want after a set time of inactivity. Read the man page on xautolock for more details, but basically you run xautolock in the background, and if you don’t touch your keyboard or mouse, it will launch any script you want, such as i3lock, to lock your system if you leave it alone. For example, to lock your screen after 3 mins use

xautolock -detectsleep -time 3 -locker "i3lock -n -c 000000"

Thank you!