config/lua: allow re-enabling monitors#14447
Conversation
|
Hello and thank you for making a PR to Hyprland! Please check the PR Guidelines and make sure your PR follows them. If your code can be tested, please always add tests. See more here. beep boop, I'm just a bot. A real human will review your PR soon. |
|
Doesn't seem to work, though? Furthermore, I don't think reloading your config should always re-enable every single connected monitor (?) |
It does seem to be working for my configuration. I'm curious what isn't working for you. I got the AI to write a small test script to show the state switching in a basic Lua config: https://gist.github.com/bizmythy/94afea4178eaf2f181d738349ea240fc
This is not what this does, to my knowledge. Reloading the config resets all configured monitors to their configured state. If a monitor specifies |
Describe your PR, what does it fix/add?
This PR configures the Lua configuration setting
hl.monitor.disabled = falseto enable the monitor.This allows Lua scripts to enable monitors that were previously disabled. Without this change, the only way I could find to re-enable a disabled monitor was to reload the entire configuration.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
This is not how the original
hyprlangconfiguration worked, so I totally understand if this is not a change that we want to make. However, I think the Lua configuration needs to provide some way to allow a user script to re-enable disabled monitors. Otherwise, I'm not sure how one would write a keybind that toggled a monitor on/off for example.Is it ready for merging, or does it need work?
Ready for merging, very small change.