Skip to content

panel: Add outputs option for per-output configuration#356

Merged
soreau merged 3 commits intomasterfrom
panel-outputs
Feb 23, 2026
Merged

panel: Add outputs option for per-output configuration#356
soreau merged 3 commits intomasterfrom
panel-outputs

Conversation

@soreau
Copy link
Member

@soreau soreau commented Feb 21, 2026

This adds a new option named 'outputs' that is a list of output names on which a panel instance should be rendered. The default value is '*' wildcard, which means all outputs.

@soreau soreau marked this pull request as draft February 21, 2026 18:59
@soreau soreau marked this pull request as ready for review February 21, 2026 19:05
public:
std::map<WayfireOutput*, std::unique_ptr<WayfirePanel>> panels;
std::map<std::string, WayfireOutput*> outputs;
WfOption<std::string> *panel_outputs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this dynamically allocated seems really weird, if you need to load an option at runtime, you can use .load_option(<option name>)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like this might work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this sounded good but I was not able to get load_option() working to help here. Maybe I am using it wrong.

@trigg
Copy link
Collaborator

trigg commented Feb 23, 2026

Sorry, I've read through it.

I currently don't know where I stand on the conversation but wonder why you're specifically avoiding doing this in shell-app.

@soreau
Copy link
Member Author

soreau commented Feb 23, 2026

... but wonder why you're specifically avoiding doing this in shell-app.

@trigg Thanks for looking. It is not the case that I set out with the intent to only touch panel.cpp, it's just the way the patch turned out. After I had it working, I noticed the only thing I had in wf-shell-app.hpp was moving the monitors list from private to public, and I never used it, in favor of the more convenient std::map that I'd installed.

I will have another look to see if using the existing monitors list is doable and get rid of the extra std::map though, if that's what you're expecting.

@soreau
Copy link
Member Author

soreau commented Feb 23, 2026

Before suggested changes: 2 files changed, 102 insertions(+), 2 deletions(-)
After suggested changes: 5 files changed, 98 insertions(+), 2 deletions(-)

Ca ne fait rien. 😀

EDIT: Adjusted to use std::find_if instead of a loop for checking if panel exists.
After suggested changes: 5 files changed, 94 insertions(+), 2 deletions(-)

@soreau soreau force-pushed the panel-outputs branch 2 times, most recently from 678d6be to b930855 Compare February 23, 2026 03:31
This adds a new option named 'outputs' that is a list of output
names on which a panel instance should be rendered. The default
value is '*' wildcard, which means all outputs.
@soreau soreau requested a review from ammen99 February 23, 2026 03:53
@soreau soreau marked this pull request as draft February 23, 2026 06:05
@soreau soreau marked this pull request as ready for review February 23, 2026 09:09
@soreau soreau marked this pull request as draft February 23, 2026 11:36
@soreau soreau force-pushed the panel-outputs branch 2 times, most recently from 735f409 to 97718e0 Compare February 23, 2026 11:41
@soreau soreau marked this pull request as ready for review February 23, 2026 11:43
Copy link
Collaborator

@trigg trigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My read through looks like the loops can be merged. Otherwise very happy with this, and if you're sure of yourself just merge this :)

Thanks to trigg for realizing this simplification.
@soreau soreau merged commit d535efa into master Feb 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants