Expose the battery percentage toggle through omarchy.power IPC
omarchy-shell omarchy.power togglePercentage now flips the same setting the widget's right-click does. Follows the monitor/tailscale pattern: manageIpc: false so the panel owns the target's single IpcHandler and can extend it past the inherited lifecycle methods. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
7020a6ea57
commit
0af39c5260
@@ -46,4 +46,6 @@ assert(/if \(b === Qt\.RightButton\) root\.togglePercentage\(\)/.test(panelSourc
|
||||
assert(/Object\.assign\([^\n]+showPercentage: !root\.showPercentage[^\n]+\)[\s\S]*updateEntryInline/.test(panelSource), 'power persists the bar percentage setting')
|
||||
assert(/Math\.round\(root\.batteryFraction \* 100\) \+ "% " \+ root\.batteryIcon\(\)/.test(panelSource), 'power places the percentage before the battery icon')
|
||||
assert(/openPanelIndicatorWidth:.*showPercentage.*button\.glyphPaintedWidth : 0/.test(panelSource), 'power spans the open-panel mark across the painted percentage block')
|
||||
assert(/IpcHandler[\s\S]*?function togglePercentage\(\) \{ root\.togglePercentage\(\) \}/.test(panelSource), 'power exposes togglePercentage over IPC')
|
||||
assert(/manageIpc: false/.test(panelSource), 'power owns its IPC handler so it can extend the target methods')
|
||||
JS
|
||||
|
||||
Reference in New Issue
Block a user