Closed techsy730 closed 2 years ago
It's not intended for the assigned priorities to be ignored.
Ah, then maybe the issue is in Main.rs
in SetForegroundProcess
. More specifically, where config.foreground
is read and unpacked
The thing part that loops over the PIDs in the foreground and compares against assignments is in the if block if let Some(foreground_priority) = config.foreground {
.
Which I think means that if config.foreground == None
, that assignment checks never get done.
Sadly I don't have a good Rust dev environment at the moment, because otherwise I would make a PR.
For my machine, I don't want system76-scheduler to mess with my niceness by default. Only when it explicitly matches a command name in some file in
system76-schedule/assignments
.So to do this, I used
/etc/system76-schedule/assignments/my_assignments.ron
, and set my/etc/system76-schedule/config.ron
to:system76-schedule correctly interpreted this a not touching background or foreground process niceness by default. Unfortunately, is also tells it to not touch background or foreground process niceness at all.
The behavior I expected was "Does not touch background or foreground process, unless there is a match in the assignments."
So can that be a thing? If people are relying on the old behavior (
None
telling system76-scheduler to skip that category entirely), then perhaps some new value we can assign that it will know "Don't touch it, but still look at the assignments and take action if found there". Likeor something.