Rewrite the manager responsible for handling automatic hyprsunset temperature activation as a qml plugin #117
Reference in New Issue
Block a user
Delete Branch "hyprsunset-manager-rewrite"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This rewrites the functionality we already had for scheduling Hyprsunset using hourly timestamps into a C++ plugin. Functionality should be the same.
It still doesn't store or capture the real state of the
hyprsunsetprocess, this is because there's no way to request whether or nothyprsunsethasidentityactive or not, usinghyprctlipc calls.The best that we could do is to not set
identitywhen turning "off" hyprsunset, and instead set a temperature that is close to (but not quite) identity. That way it could usehyprctl hyprsunset temperatureoutput to determine a real on/off state rather than manually setting a boolean for those states.I presume that this would theoretically offset some system resources since C++ would be more efficient? I mean, likely negligible. Will test later.
Due to how small in scale the original code was I think it'd be pretty difficult to see much performance gain with this plugin. I also didn't write it having "performance-first" in mind. But maybe by some metric it's better.
Yea, I have no specific expectation at all.
There's currently a bug where the Manager doesn't set
identityon initialization if current time is outside scheduled time. I will probably fix this by using a three-state enum rather than boolean.Functionally works. Nothing out of the ordinary in the logs. Code looks fine too.
Since there is a bug, I'd say to resolve that, then it is as good as approved.