Use power button to open omarchy-menu system (#769)

* Use power button to open omarchy-menu system

* Added migration script

* setsid so it doesn't exit with the terminal

* Spacing

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
Denis Koleda 2025-08-23 01:31:17 +10:00 committed by GitHub
parent 58d6b5ba7f
commit c3b58bc773
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,7 @@ bindd = SUPER, SPACE, Launch apps, exec, walker -p "Start…"
bindd = SUPER CTRL, E, Show clipboard, exec, walker -m Emojis
bindd = SUPER ALT, SPACE, Omarchy menu, exec, omarchy-menu
bindd = SUPER, ESCAPE, Power menu, exec, omarchy-menu system
bindld = , XF86PowerOff, Power menu, exec, omarchy-menu system
bindd = SUPER, K, Show key bindings, exec, omarchy-menu-keybindings
# Aesthetics

View File

@ -75,6 +75,7 @@ source $OMARCHY_INSTALL/config/timezones.sh
source $OMARCHY_INSTALL/config/login.sh
source $OMARCHY_INSTALL/config/nvidia.sh
source $OMARCHY_INSTALL/config/increase-sudo-tries.sh
source $OMARCHY_INSTALL/config/ignore-power-button.sh
# Development
source $OMARCHY_INSTALL/development/terminal.sh

View File

@ -0,0 +1,5 @@
#!/bin/bash
# Disable shutting system down on power button to bind it to power menu afterwards
sudo sed -i 's/.*HandlePowerKey=.*/HandlePowerKey=ignore/' /etc/systemd/logind.conf

5
migrations/1755208929.sh Normal file
View File

@ -0,0 +1,5 @@
echo "Change behaviour of XF86PowerOff button to show omarchy system menu insead of shutting down immediately"
source $OMARCHY_PATH/install/config/ignore-power-button.sh
setsid systemd-inhibit --what=handle-power-key --why="Temporary disable power button before restart" sleep infinity &