From eb1a34ecd03a0139220db26b2ffe61d297cbbc9c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 11 Oct 2026 16:03:17 +0900 Subject: [PATCH] Move Battery Percentage under Appearance > Menu Bar > Indicators Co-Authored-By: Claude Opus 5.5 --- default/omarchy/omarchy-menu.jsonc | 3 ++- test/shell.d/menu-test.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/default/omarchy/omarchy-menu.jsonc b/default/omarchy/omarchy-menu.jsonc index a697c402..276f7d25 100644 --- a/default/omarchy/omarchy-menu.jsonc +++ b/default/omarchy/omarchy-menu.jsonc @@ -67,11 +67,12 @@ "trigger.appearance.top-bar.position": {"icon":"","label":"Position Bar"}, "trigger.appearance.top-bar.transparent": {"icon":"󰂵","label":"Transparent Bar","when":"! jq -e .bar.transparent ~/.config/omarchy/shell.json >/dev/null 2>&1","action":"omarchy-bar transparent true"}, "trigger.appearance.top-bar.opaque": {"icon":"󰂵","label":"Opaque Bar","when":"jq -e .bar.transparent ~/.config/omarchy/shell.json >/dev/null 2>&1","action":"omarchy-bar transparent false"}, + "trigger.appearance.top-bar.indicators": {"icon":"󰋽","label":"Indicators"}, + "trigger.appearance.top-bar.indicators.battery-percentage": {"icon":"󰁹","label":"Battery Percentage","when":"omarchy-hw-laptop","action":"omarchy-shell omarchy.power togglePercentage"}, "trigger.appearance.top-bar.position.top": {"icon":"󰁝","label":"Top Bar","action":"omarchy-bar position top"}, "trigger.appearance.top-bar.position.bottom": {"icon":"󰁅","label":"Bottom Bar","action":"omarchy-bar position bottom"}, "trigger.appearance.top-bar.position.left": {"icon":"󰁍","label":"Left Bar","action":"omarchy-bar position left"}, "trigger.appearance.top-bar.position.right": {"icon":"󰁔","label":"Right Bar","action":"omarchy-bar position right"}, - "trigger.appearance.battery-percentage": {"icon":"󰁹","label":"Battery Percentage","when":"omarchy-hw-laptop","action":"omarchy-shell omarchy.power togglePercentage"}, "trigger.appearance.window-gaps": {"icon":"","label":"Window Gaps","action":"omarchy-hyprland-window-gaps-toggle"}, "trigger.appearance.one-window-ratio": {"icon":"","label":"1-Window Ratio","action":"omarchy-hyprland-window-single-square-aspect-toggle"}, "trigger.appearance.workspace-layout": {"icon":"󱂬","label":"Workspace Layout","title":"Default Workspace Layout"}, diff --git a/test/shell.d/menu-test.sh b/test/shell.d/menu-test.sh index a7584920..a49a89c2 100644 --- a/test/shell.d/menu-test.sh +++ b/test/shell.d/menu-test.sh @@ -365,7 +365,7 @@ assert( ) assertDeepEqual( defaultItems.filter(item => item.parent === 'trigger.appearance.top-bar').map(item => item.label), - ['Hide Bar', 'Show Bar', 'Position Bar', 'Transparent Bar', 'Opaque Bar'], + ['Hide Bar', 'Show Bar', 'Position Bar', 'Transparent Bar', 'Opaque Bar', 'Indicators'], 'menu gathers the Menu Bar under Trigger > Appearance' ) assert( @@ -390,13 +390,18 @@ assert( && defaultById['trigger.appearance.top-bar.transparent'].when === '! ' + defaultById['trigger.appearance.top-bar.opaque'].when, 'menu offers Transparent Bar while the bar is opaque and Opaque Bar while it is transparent' ) +assertDeepEqual( + defaultItems.filter(item => item.parent === 'trigger.appearance.top-bar.indicators').map(item => item.label), + ['Battery Percentage'], + 'menu gathers bar indicator options under Menu Bar > Indicators' +) assertDeepEqual( ['top', 'bottom', 'left', 'right'].map(position => defaultById[`trigger.appearance.top-bar.position.${position}`].label), ['Top Bar', 'Bottom Bar', 'Left Bar', 'Right Bar'], 'menu names each position after the bar' ) const triggerIds = triggerItems.map(item => item.id) -const appearanceLabels = ['Animations', 'Menu Bar', 'Battery Percentage', 'Window Gaps', '1-Window Ratio', 'Workspace Layout', 'Herdr Theme Sync'] +const appearanceLabels = ['Animations', 'Menu Bar', 'Window Gaps', '1-Window Ratio', 'Workspace Layout', 'Herdr Theme Sync'] assertEqual(triggerIds.indexOf('trigger.appearance'), triggerIds.indexOf('trigger.toggle') + 1, 'menu places Appearance right after Toggle') assertDeepEqual( defaultItems.filter(item => item.parent === 'trigger.appearance').map(item => item.label),