That's my configuration. I suppose it can be useful.
-------------------- ~/.i3/config --------------------
# power-mode
mode "power" {
bindsym s exec sudo /usr/sbin/pm-suspend
bindsym h exec sudo /usr/sbin/pm-hibernate
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
------------------------------------------------------
-------------------- /etc/sudoers --------------------
%sudo ALL=(ALL:ALL) ALL, NOPASSWD: /usr/sbin/pm-hibernate
-------------------- /etc/sudoers --------------------
Attachment:
pgptz9GUptVvR.pgp
Description: PGP signature