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

Setting background and foreground to None in config.ron causes explicit process assignments to be ignored #55

Closed
techsy730 opened this issue May 30, 2022 · 1 comment · Fixed by #78

Comments

@techsy730
Copy link
Contributor

techsy730 commented May 30, 2022

Setting your config.ron to have

{
  background: None,
  foreground: None,
}

Causes any explicit process assignments (assignments.ron and others) to be not applied.

Seems to be a regression of #12, in which it was stated the desired behavior was to still allow per-process assignments to apply even with None.

If only background is None, then per-process mappings are only applied when a process goes into the foreground.
The opposite for foreground.

@techsy730
Copy link
Contributor Author

techsy730 commented Jun 11, 2022

Given how complex the "reading the configuration for process assignments" is (mostly by necessity to both satisfy the type system and to follow idiomatic Rust practices), I'm wondering whether the "do it at all or not" needs to be pulled into it's own option. Instead of trying to treat an explicit None value specially.

This overloading of the option's meaning, combined with change to restore foreground->background niceness properly, sort of mandates these complex if let Some and Some.with_default chains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant