-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Monitor v2 config #9761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Monitor v2 config #9761
Conversation
what about dynamic calls? |
Do they work with |
yes they do work, I'm just curious how you'd handle them with this without a billion commits |
Looks like |
|
@@ -1087,6 +1087,19 @@ static std::string dispatchKeyword(eHyprCtlOutputFormat format, std::string in) | |||
if (COMMAND == "monitor" || COMMAND == "source") | |||
g_pConfigManager->m_bWantsMonitorReload = true; // for monitor keywords | |||
|
|||
if (COMMAND.contains("monitorv2")) { | |||
if (COMMAND.contains('[') && COMMAND.contains(']')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we handling this? This is handled by hyprlang, no?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Special categories are parsed without any handlers attached. Need a way to trigger a handler after the parsing for a given output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just because this MR has a weird approach. Why not use the approach like for device configs? After a dyncall, or after parsing, recheck monitorv2 stuff. If anything changed, update and reload monitor mode
|
Describe your PR, what does it fix/add?
Adds a
monitorv2
config special category similar todevice
.CM needs more monitor settings. Placing them into the current
monitor
config makes it too complicated.Minimum
monitorv2
config should look like this:Other settings have the same names as in
monitor
config.Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
handleMonitorv2
is called for everymonitorv2
at once.addSpecialCategory
orSSpecialCategoryOptions
need an additional handler parameter similar toregisterHandler
to handle eachmonitorv2
individually.monitorv2
rules will override anything set bymonitor
rules wheneverhandleMonitorv2
is called. During a config reload it'll happen after every othermonitor
rule regardless of their order inside the config.Is it ready for merging, or does it need work?
Ready