Repository navigation
Show each app's Hyprland hotkey on its row - #117
Closed
LucasMouraFranco wants to merge 3 commits into
Closed
LucasMouraFranco wants to merge 3 commits into
LucasMouraFranco wants to merge 3 commits into
Conversation
An app row now carries the bind that opens it as keycaps, the way Raycast shows a command's hotkey: Ghostty gets Super ↵, the default browser Super Shift ↵. KeybindingSource reads Omarchy's own keybinding record cache (refreshed through omarchy-menu-keybindings --print), plus the default terminal, browser and editor. Keybindings.js matches each exec bind to a desktop entry: Omarchy's terminal, browser and editor launchers through those defaults, web apps by URL, launch-or-focus and TUI launchers by the program they start, and a bare program by name. A command with arguments marks nothing. The About panel lists the hotkey, and the site demo shows Omarchy's default app binds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Any row can get its own hotkey from the action panel (Record Hotkey /
Change Hotkey), like Raycast's command hotkeys. The recorder view takes a
chord with Super, Ctrl or Alt (F-keys alone are fine), shows conflicts with
other omacast hotkeys and Hyprland binds, and saves to settings.json
`commands[id].hotkey`. Remove Hotkey clears it, or unbinds the Omarchy bind
an app row shows; Restore Default Hotkey brings that bind back.
services/HotkeyBinder.qml applies the hotkeys at runtime with
`hyprctl eval` (hl.bind to hl.dsp.global("omacast:hk-…")), so omacast
writes no Hyprland config. It re-applies after every configreloaded, and
uses a config-only reload when a bind has to be given back. Each hotkey is
a GlobalShortcut in Launcher.qml; pressing it again while its view is open
closes the launcher. The argv carries only key names, hashed shortcut names
and row titles.
The website demo ports the recorder and the actions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record, remove and restore hotkeys for any command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
App rows now show the Hyprland bind that opens the app, as keycaps on the right of the row, the way Raycast shows a command's hotkey. On a default Omarchy setup, Ghostty shows Super ↵, the default browser Super Shift ↵, Files Super Shift F, and web apps, Obsidian, Neovim etc. get theirs.
How it works
~/.cache/omarchy/keybindings-*.records).services/KeybindingSource.qmlrunsomarchy-menu-keybindings --printto keep that cache current (~90 ms warm), reads the newest file, and reads the default terminal (xdg-terminals.list), browser (omarchy-cmd-default-browser) and editor. It rescans on start, on Hyprlandconfigreloaded, and on show at most once a minute.core/Keybindings.js, pure, unit-tested): eachexecbind is matched to a desktop entry.omarchy-launch-terminal/-browser/-editorgo through the defaults, so switching your default browser moves the keycaps.omarchy-launch-or-focusand the TUI launchers match by the program they start, andomarchy-launch-<app>by name.alacritty -e ssh box),--privateand pipelines mark nothing.KeyHintaccessory inResultRow, plus a "Hotkey" line in the About panel. The site demo is ported with Omarchy's default app binds.No new dependencies, and nothing the user typed goes to argv.
Testing
node --test tests/*.test.jspasses, including the newtests/keybindings.test.js.omarchy plugin validate .passes.rootSearch.searchreturns the hotkeys, and a screenshot shows the keycaps on the favorited Ghostty, Zen Browser and Files rows.Known miss: HEY's desktop entry runs
omarchy-webapp-handler-heyinstead of the web app URL, so it doesn't pick up Super Shift E.🤖 Generated with Claude Code