Skip to content

Instantly share code, notes, and snippets.

@raifpy
Last active December 14, 2020 21:54
Show Gist options
  • Save raifpy/e9c0a3ab5b02a003654538f8211f80d1 to your computer and use it in GitHub Desktop.
Save raifpy/e9c0a3ab5b02a003654538f8211f80d1 to your computer and use it in GitHub Desktop.
i3 Disable Power Button/Key

First:

sudo nano /etc/systemd/logind.conf

Find;

  #HandlePowerKey=poweroff

And Replace Like This;

  HandlePowerKey=ignore

After open your i3 config and append they;

bindsym XF86PowerOff exec --no-startup-id "i3-nagbar -t warning -m 'pressed PowerButton'"
bindsym XF86PowerDown exec --no-startup-id "i3-nagbar -t warning -m 'pressed PowerButton'"

Finally;

reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment