Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions bin/omarchy-menu-keybindings
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ BEGIN {
}
{
# Combine the modifier and key (first two fields)
key_combo = $1 " + " $2;
modifiers = $1;
gsub(/[ \t]+/, " + ", modifiers);
key_combo = modifiers " + " $2;

# Clean up: strip leading "+" if present, trim spaces
gsub(/^[ \t]*\+?[ \t]*/, "", key_combo);
Expand Down Expand Up @@ -481,7 +483,7 @@ prioritize_entries() {
awk -F '\t' '
{
# Alternative chords are display only. Classifying on them would read
# "SUPER SHIFT + RETURN / SUPER SHIFT + B" as the alternate browser chord
# "SUPER + SHIFT + RETURN / SUPER + SHIFT + B" as the alternate browser chord
# and drop the browser 20 rows down its own list, so match the chord that
# leads the row and ignore the rest.
line = $1
Expand All @@ -491,7 +493,7 @@ prioritize_entries() {
if (match(line, /Keybindings/)) prio = 0
if (match(line, /Omarchy menu/)) prio = 1
if (match(line, /Terminal/)) prio = 2
if (match(line, /Browser/) && !match(line, /Browser[[:space:]]*\(/) && !match(line, /SUPER SHIFT.*\+.*B.*→.*Browser/)) prio = 3
if (match(line, /Browser/) && !match(line, /Browser[[:space:]]*\(/) && !match(line, /SUPER \+ SHIFT.*\+.*B.*→.*Browser/)) prio = 3
if (match(line, /File manager/) && !match(line, /File manager \(cwd\)/)) prio = 4
if (match(line, /Launch apps/)) prio = 5
if (match(line, /System menu/)) prio = 6
Expand All @@ -515,7 +517,7 @@ prioritize_entries() {
if (match(line, /Screenrecording/)) prio = 24
if (match(line, /Tmux/)) prio = 25
if (match(line, /Herdr/)) prio = 26
if (match(line, /SUPER SHIFT.*\+.*B.*→.*Browser/)) prio = 27
if (match(line, /SUPER \+ SHIFT.*\+.*B.*→.*Browser/)) prio = 27
if (match(line, /File manager \(cwd\)/)) prio = 28
if (match(line, /(Switch|Next|Former|Previous).*workspace/)) prio = 29
if (match(line, /Move window to workspace/)) prio = 30
Expand Down Expand Up @@ -609,7 +611,7 @@ output_binding_records_uncached() {

keybindings_cache_key() {
{
printf 'v17\n'
printf 'v18\n'
leading_keyboard
omarchy-language 2>/dev/null
cat "$OMARCHY_PATH/default/i18n/$(omarchy-language 2>/dev/null)/keybindings.json" 2>/dev/null
Expand Down