Skip to content
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

Add a .display-layout configuration file #2832

Merged
merged 2 commits into from Feb 16, 2023
Merged

Add a .display-layout configuration file #2832

merged 2 commits into from Feb 16, 2023

Conversation

AlanGriffiths
Copy link
Contributor

In cases where a .display configuration fle is used add an additional .display-layout configuration file.

Creating or updating this file will update the active display layout.

Copy link
Contributor

@wmww wmww left a comment

Choose a reason for hiding this comment

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

Other than the one thing looks good to me

std::lock_guard lock{mutex};
if (!config_path_) return;

if (std::ifstream layout_file{config_path_.value() + "/" + basename + "-layout"})
Copy link
Contributor

@wmww wmww Feb 15, 2023

Choose a reason for hiding this comment

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

The "-layout" string literal only appears twice, but still seems like it would be a better idea to not repeat it. You could have a const global, a layout_override_for_basename(basename) standalone helper or something else.

Copy link
Contributor

@RAOF RAOF left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@wmww wmww left a comment

Choose a reason for hiding this comment

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

bors r+

@bors bors bot merged commit 30e8c50 into main Feb 16, 2023
@bors bors bot deleted the more-display-configs branch February 16, 2023 17:20
bors bot pushed a commit to canonical/ubuntu-frame that referenced this pull request Feb 17, 2023
This allows the active display layout to switched without restarting Frame

requires canonical/mir#2832 to work
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.

None yet

3 participants