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

Proposal: modes #335

Closed
emersion opened this issue Jan 31, 2021 · 8 comments · Fixed by #362
Closed

Proposal: modes #335

emersion opened this issue Jan 31, 2021 · 8 comments · Fixed by #362
Labels
enhancement New feature or request

Comments

@emersion
Copy link
Owner

This is a counter-proposal for #138.

Instead of allowing to change arbitrary configuration options, we could introduce modes:

[mode=dnd]
invisible=1

Modes could be switched at runtime with e.g. makoctl set-mode dnd. There is only one mode active at a time.

@emersion emersion added the enhancement New feature or request label Jan 31, 2021
@fluix-dev
Copy link
Contributor

Ooh, I like this proposal, especially with #306. This seems much simpler to both use and implement without confusion w.r.t. merging contexts.

The only issue I imagine is that with #138, you can dynamically generate everything on-the-fly, while this proposal requires hard coding all possible values. However, because makoctl reload is hot reloading, people can resort to modifying the config and reloading which I think is a fine compromise (granted I have no purpose for dynamically generating criteria myself).

@vilhalmer
Copy link
Collaborator

I think this is the right path forward. It also doesn't preclude adding set back later if we have some breakthrough on making it usable.

@fluix-dev
Copy link
Contributor

It also doesn't preclude adding set back later if we have some breakthrough on making it usable.

I think this is a main reason I like this proposal. It has no conflicts with set.

@emersion
Copy link
Owner Author

emersion commented May 3, 2021

There is only one mode active at a time.

Side note: I can see how allowing multiple modes active at the same time could be useful, but I'm not sure it's something we want.

@fluix-dev
Copy link
Contributor

I don't think there's a need to do it right now either, and in the future we could have makoctl add-mode <mode> and makoctl del-mode <mode> or similar.

emersion added a commit that referenced this issue Jun 15, 2021
@emersion
Copy link
Owner Author

I've implemented this in #362. Please try it out!

@maximbaz
Copy link
Contributor

Works well for me, thank you for implementing it!

emersion added a commit that referenced this issue Jun 17, 2021
@cherti
Copy link

cherti commented Jun 17, 2021

When I try ./makoctl set-mode dnd I get "Call failed: Transport endpoint is not connected". What could be the cause of that? The mako running is the mako that is built from the branch, the dnd-mode is specified (simply copied from your example to the end of my mako-config), commenting out all other options in the config doesn't resolve the issue. mako is explicitly started and not dbus-activated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants