system76-scheduler
system76-scheduler copied to clipboard
Setting background and foreground to None in config.ron causes explicit process assignments to be ignored
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
.
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.