[draft] Add Setting to trigger command execution on monitor change - #8746
[draft] Add Setting to trigger command execution on monitor change#8746tcanabrava wants to merge 2 commits into
Conversation
nbolton
left a comment
There was a problem hiding this comment.
Code style: Please use camelCase instead of snake_case.
|
@sithlord48 need your help here. I was unable to quickly find a way to read the settings of the Screens via a but aparently I do not have the possibility to read the config here. @nbolton - your help here is appreciated too. |
So from within the Core (server/client) you want to read server-specific settings? Try It may be helpful for you to know that the server settings in the Core are loaded in deskflow/src/lib/deskflow/ServerApp.cpp Line 184 in ab3310f
It's because the [newer] GUI is modelled on the [ancient] Core; the concept of configuring the server came first, which is why it has it's own config. For a long time the only way to configure the client was through CLI (and part of the server config was done via CLI too) -- edit: and technically this is still the case; the as the GUI sends the Core CLI args. The I believe Chris R's vision is to replace this bifurcated config mess with a single unified config. edit: and we would drop the notion of configuring the Core via CLI; it would be done by reading the Qt config directly from within the Core. |
If this is still a draft, shall we switch the PR to draft mode to make it clearer? |
I assumed it would automatically pick up as draft as soon as I added the |
No, I want to be able to read the |
|
@nbolton tried to change to draft mode but I don't seem to be able to access the draft checkbox. |
|
@tcanabrava i added draft for you. I think some of this you can split out and we can land as just general improvements iirc the first 3 commits. you need to set the option in the gui setting's internalConfiguration section then it can be used to generate server settings. The server and screen settings need to be updated they are confusion for sure. Also when this is ready we use tags like |
This comment was marked as outdated.
This comment was marked as outdated.
|
sorry about the dialog thing. we can minimize it to the minimum size without issues. my desktop screen is quite large and I have not realized it. |
|
|
||
| auto enter_command = settings.value("EnterScreenCommand").toString(); | ||
| m_enterScreenCommand = enter_command.isEmpty()? std::nullopt : enter_command; | ||
| if (enter_command.isEmpty()) { |
There was a problem hiding this comment.
What if we do this as a general rule when replacing ternary operations.
m_var = std::nullopt;
if (!foo.isEmpty())
m_var = otherValue;
It will take a moment in execution but maybe ultimately safer. What do u think Tomaz ?
70bdd9a to
3bedb70
Compare
3bedb70 to
7543c2d
Compare
7543c2d to
623acd5
Compare
623acd5 to
2543248
Compare
|
@tcanabrava / @nbolton I have been thinking about this and I am not sure that we need to set this on the server side. Since the main use case for this feature will be to send commands to the monitor to switch inputs the setting should be done in the generic settings this would make the entry / exit command the same no matter what mode is being used (and no matter what server your connected to when a client). It would also be easier to implement. |
|
replaced by #9564 |
Rebased upon: #8919