manicx100
(Daniel Kendall)
1
I am trying to map a keyboard shortcut to put my computer to sleep.

I have successfully enabled my user to run the command without prompt.
and when I run
sudo systemctl suspend
via terminal it works perfectly.
However, when I run my new keyboard shortcut, it works perfectly and goes to sleep for 1 second before immediately resuming.
Any advice?
manicx100
(Daniel Kendall)
2
Well that was simple. Fix was there was already a built in keyboard shortcut for sleep so I didn’t even have to use the terminal command.
1 Like
mavinii
(Marcos Oliveira)
3
I’m using Fedora 37 with X11 and I could not get it done. So I created shortcut using systemctl suspend -i while pressing crtl + del, it worked great.
1 Like
pipicom
(Spyros Papas)
4
Marcos solution works like a charm 
1 Like