Fix Display panel monitor toggle under the Lua config parser - #11112
Open
gushy79 wants to merge 1 commit into
Open
Fix Display panel monitor toggle under the Lua config parser#11112gushy79 wants to merge 1 commit into
gushy79 wants to merge 1 commit into
Conversation
The per-monitor enable/disable rows in the Display panel run
`hyprctl keyword monitor <name>,disable`, which Hyprland rejects when the
config is parsed by the Lua parser ("keyword can't work with non-legacy
parsers. Use eval.") — the default for Omarchy's Lua hypr config, so the
toggle is a silent no-op for essentially every v4 install. Drive the Lua
`hl.monitor` helper through `hyprctl eval` instead, matching how
`omarchy-hyprland-monitor-internal` already disables the internal display,
and guard the connector name like the bin/ monitor helpers before it is
interpolated into the eval'd string.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gushy79
force-pushed
the
fix-monitor-toggle-lua-parser
branch
from
September 10, 2026 10:16
6bb7969 to
81fcc09
Compare
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.
Problem
The Display bar panel (
shell/plugins/panels/monitor/Panel.qml) lists everydisplay with an enable/disable row, but
toggleDisplay()runs:Hyprland disables the legacy
hyprctl keywordIPC whenever the config is readby the Lua parser:
Omarchy v4 ships the Lua hypr config as the sole default (
config/hypr/*.lua,no
hyprland.conf), so on a stock v4 install every monitor on/off row in thepanel is a silent no-op — the command errors on stderr, which the panel
doesn't surface. Brightness and scale in the same panel are unaffected; they
go through
omarchy-*helpers.Fix
Drive the Lua
hl.monitorhelper throughhyprctl evalinstead, which is thesame mechanism
bin/omarchy-hyprland-monitor-internalalready uses to disablethe internal display (
hl.monitor({ output = ..., disabled = true })). Theconnector name comes from
omarchy-monitor-state(Hyprland.name), and isguarded with the same
^[A-Za-z0-9._-]+$check thebin/monitor helpersapply before interpolating a name into eval'd Lua.
Re-enabling with
disabled = falsepicks the mode/position back up from thecatch-all
hl.monitor({ output = "", mode = "preferred", position = "auto" })rule, matching the previous
,preferred,auto,autobehaviour. Like the oldcode this is a runtime change and doesn't persist across a config reload —
semantics are unchanged there.
Testing
./test/shell— no new failures (the 6 pre-existing failures on my machine —config,locate,runtime-smoke,screenshot-sanity,snapper,unowned-system-paths— reproduce on a cleanquattrocheckout and areenvironmental).
row off/on from the panel now disables/re-enables the output
(
hyprctl monitorsdisabled:flips); before the patch the rows didnothing.
🤖 Generated with Claude Code