r/kde • • 2d ago

KDE Apps and Projects SunReactor: Brightness automation using solar elevation, now with a Plasma 6 widget

Hi everyone,

Months ago, I made a monitor brightness automation daemon called SunReactor, which I use daily across both a multi monitor KDE desktcop and a laptop. Previously it was TUI-only, but now the widget can be added to both the desktop and the panel, giving quick controls with different theme settings for different tastes. I believe it's mature enough to share now.

It adjusts brightness using ddcutil and sysfs based on solar elevation. It tracks sunrise/sunset for your selected city/coordinates and shifts the curve seasonally. So your monitors will always follow your set range scientifically, but you can still fine-tune everything, like the curve amplitude, and when it transitions between values. It can optionally pull cloud cover from OpenWeather to dim slightly on cloudy days, and adding a free weather API also lets it show weather info in the widget and TUI.

Daemon uses 7-10 MB of RAM, and the widget adds 10-20 MB on the panel (approx. 20 to 50 MB with the popup open).

Feel free to try it out. It has quick install/uninstall scripts. Bug reports, pull requests, and suggestions are welcome.

Repo: https://github.com/arcanorca/SunReactor/
Plugin: https://store.kde.org/p/2383029/

7 Upvotes

7 comments sorted by

•

u/AutoModerator 2d ago

Thank you for your submission.

Consider donating to KDE and help the project thrive!

The KDE community supports the Fediverse and open source social media platforms over proprietary and user-abusing outlets. Consider visiting our community on Mastodon (Lemmy will be back shortly). Tag us in your toots! You can also visit our forum at KDE Discuss to talk about KDE stuff, brainstorm ideas and get the answers to your KDE-related issue.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

6

u/SeniorMatthew 2d ago

I don't like the vibecoded UI, especially Pixel Art looks like shit. But overall looks nice.

1

u/fireatstaticvalley 2d ago

Fair point. For the retro themes tried to stick to the original hardware's fonts and design choices but it probably would've been better to give more focus on fundamental ones instead of trying to juggle too many things at once i suppose.

2

u/dentino_F 1d ago

This is a tool I've been looking for and I'm quite interested in the functionality it offers.

Opensuse Tumbleweed freshly updated. Couldn't make it work.

Both displays unknown. Brightness values never applied. Restarted, rebooted. Nothing works.

I know ddcutil is a very strange beast so I'm not really disappointed. On the other hand I don't know how to help you debug this thing.

I don't mind the cornucopia of themes as long as there would exist a Breeze one and it would be applied by default (+day/night variants). It's hard to find a non-eyesore one when we run a vanilla system (which a good proportion of your users will probably run).

I also had to install all qt6-devel packages to make it run. Why is that?

Generally I'd say the level of polish in presentation is incongruent to the level of polish in functionality (yes, ddc is the bane of a smooth linux desktop experience but... it (kinda) works on plasma).

Good job all in all, please post again if you have any significant updates.

1

u/fireatstaticvalley 15h ago

Thanks for the detailed feedback! I ran hundreds of tests before release but couldnt foresee that issue. Also don't know why I didnt include simpler themes since they are most common. That reminded me Eric Raymond's "release early, release often" quote.

For qt6-devel packages issue, right now our install script accidentally asks forQt6::Test too because it runs CMake without-DBUILD_TESTING=OFF. Since the installer compiles the plugin locally instead of shipping a prebuilt binary, and doesn't list the exact openSUSE devel package names upfront, I suppose CMake ends up failing one missing module at a time that causes wholesale installment. I think prebuilding the plugin and alternatively printing dependency list will fix that.

I'm going to dig into unknown displays issue on openSUSE in detail. Unlike Plasma's PowerDevil (which links libddcutil directly), sunreactord shells out to the ddcutil CLI from a systemd --user service, might be trip over a missing ddcutil CLI package or permission issue.
By the way, SunReactor has a diagnostic report command. If you're willing to share the output of: sunreactorctl doctor --report
maybe we can find something from that.

Probably until sunday I will check and hopefully fix the all mentioned issues. Thanks again!

1

u/sirloindenial 2d ago edited 2d ago

is this like f.lux? which would be a good if it does but im not sure cause you made it look like its plugin focused. its also brightness based only it seems so add temperature related. also add like shortcuts to add/remove overlay intensity to reduce brightness further. see f.lux/redshift-gtk you will understand what i mean. kde has night light but its not dynamic which i missed a lot from f.lux.

2

u/fireatstaticvalley 1d ago

it's a standalone daemon underneath, meant to pair with f.lux or Night Light rather than replace them. they handle software color temp, while SunReactor adjusts the hardware backlight (ddcutil/sysfs).

i thought about adding color temp and dimming overlays, too, but on Wayland/KWin an external daemon can't cleanly touch the color pipeline or draw fullscreen overlays anyway. sticking to hardware brightness keeps it DEagnostic, and for me wrestling with PowerDevil resetting brightness on sleep/wake was quite hard to deal with.

as for shortcuts, there's no overlay to push below hardware min, but you can bind sunreactorctl (set, suspend, resume) to KDE shortcuts right now. adding relative brightness up/down commands for quick keyboard stepping is something I could add, too. Thanks!