Update keyboard shortcuts script to show all runtime keybinds (#70)

* feat: Add a keyboard shortcuts helper

This commit:

* Changes keybinds to use `bindd` and adds descriptions for each one
* Changes the keybinds script to use `hyprctl binds` to inspect runtime keybinds
and generate a wofi menu to search/inspect keybinds

* Rely on 'order defined' for sorting

Using `hyprctl binds` lets us get the binds in the order they're
defined. This lets us be deliberate about what keybinds we want to show
up at the top of the presented window.

* Skip cache file for keybinds

* Strip extra newline causing double spacing
This commit is contained in:
Nathan Anderson
2025-07-13 20:17:48 -04:00
committed by GitHub
parent 41b5893d32
commit 6433511873
8 changed files with 148 additions and 131 deletions

View File

@ -1,32 +1,29 @@
# Launching
bind = SUPER, space, exec, pkill wofi || wofi --show drun --sort-order=alphabetical --style="$HOME/.local/share/omarchy/default/wofi/search.css"
bind = SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings
# Aesthetics
bind = SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar
bind = SUPER CTRL, SPACE, exec, ~/.local/share/omarchy/bin/swaybg-next
bind = SUPER SHIFT CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-next
bindd = SUPER SHIFT, SPACE, Hide Waybar, exec, pkill -SIGUSR1 waybar
bindd = SUPER ALT, SPACE, Reload Waybar, exec, pkill -SIGUSR2 waybar
bindd = SUPER CTRL, SPACE, Next Wallpaper, exec, ~/.local/share/omarchy/bin/swaybg-next
bindd = SUPER SHIFT CTRL, SPACE, Next Theme, exec, ~/.local/share/omarchy/bin/omarchy-theme-next
# Notifications
bind = SUPER, comma, exec, makoctl dismiss
bind = SUPER SHIFT, comma, exec, makoctl dismiss --all
bind = SUPER CTRL, comma, exec, makoctl mode -t do-not-disturb && makoctl mode | grep -q 'do-not-disturb' && notify-send "Silenced notifications" || notify-send "Enabled notifications"
bindd = SUPER, comma, Dismiss Notification, exec, makoctl dismiss
bindd = SUPER SHIFT, comma, Dismiss All Notifications, exec, makoctl dismiss --all
bindd = SUPER CTRL, comma, Toggle Do Not Disturb, exec, ~/.local/share/omarchy/bin/omarchy-toggle-dnd
# Power menu controls lock, suspend, relaunch, restart, shutdown
bind = SUPER, ESCAPE, exec, ~/.local/share/omarchy/bin/omarchy-power-menu
bindd = SUPER, ESCAPE, Show Power Menu (Lock/Suspend/Relaunch/Restart/Shutdown), exec, ~/.local/share/omarchy/bin/omarchy-power-menu
# Toggle idling
bind = SUPER CTRL, I, exec, ~/.local/share/omarchy/bin/omarchy-toggle-idle
bindd = SUPER CTRL, I, Toggle Idling, exec, ~/.local/share/omarchy/bin/omarchy-toggle-idle
# Control Apple Display brightness
bind = CTRL, F1, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000
bind = CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000
bind = SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000
bindd = CTRL, F1, Dim Apple Screen Brightness, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000
bindd = CTRL, F2, Raise Apple Screen Brightness, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000
bindd = SHIFT CTRL, F2, Set Apple Screen Brightness to Max, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000
# Screenshots
bind = , PRINT, exec, hyprshot -m region
bind = SHIFT, PRINT, exec, hyprshot -m window
bind = CTRL, PRINT, exec, hyprshot -m output
bindd = , PRINT, Screenshot a Region, exec, hyprshot -m region
bindd = SHIFT, PRINT, Screenshot a Window, exec, hyprshot -m window
bindd = CTRL, PRINT, Screenshot Desktop, exec, hyprshot -m output
# Color picker
bind = SUPER, PRINT, exec, hyprpicker -a
bindd = SUPER, PRINT, Pick a Color, exec, hyprpicker -a