-
Notifications
You must be signed in to change notification settings - Fork 146
refactor(output config): move to config crate #1596
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: master
Are you sure you want to change the base?
Conversation
this allows the greeter to easily sync to the user config
Why does the greeter need to parse and understand the output config? Due to the somewhat fragile nature, this only being read/written by cosmic-comp is very intentional. |
I'm aware that this is very intentionally internal state, but I'm just not sure what the alternative is. The greeter daemon is currently what reads the user config and then the greeter applies it. Cosmic-comp also reads its config on start and doesn't watch the outputs.ron for changes as far as I can tell, so the greeter can't just copy the file. It parses the config if it can, then uses cosmic-randr to apply the config, checking the difference between the active config and user config. |
I see, cosmic-greeter parses it from the user and applies it via cosmic-randr again in pop-os/cosmic-greeter#284. I dislike this a lot, but I don't have a much better idea. However I would like to make the following changes:
|
Ok, that sounds good to me.
Sure, I'll refactor the application of the changes a bit to try batching the changes, and revert on failure if possible. Long term, I agree that cosmic-randr could use some changes. |
Perhaps cosmic-randr could take a KDL-serialized input from stdin for performing multiple operations atomically. |
The latest changes seem to work now, but there seems to be a bug related to surface positioning. My guess is that the greeter needs to reposition the menu subsurface after being reconfigured. Alternatively, it could wait for output reconfiguration to be completed before creating the menus to begin with. |
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.
This look good to me now (except of course fixing cosmic-comp-config's default features and the pending merge for cosmic-randr-shell).
Very cool how this now mostly simplified cosmic-comps code instead of just introducing a bunch of wrapper types. 👍
So is the output configuration only synced once or whenever a new user is selected as well? |
Ya that's a good point. I keep forgetting that the configuration needs to change per user. I may need to add a message to cosmic-greeter after a different user is selected to re-do the sync too, then once completed, reposition. |
this allows the greeter to easily sync to the user config.