oskarsh / Yin-Yang

Auto Nightmode for KDE, Gnome, Budgie, VSCode, Atom and more
MIT License
606 stars 52 forks source link

DPI; state-check; add-on/browser/multi-Wallpaper support; KDE merge #80

Closed bphd closed 1 year ago

bphd commented 3 years ago

Make the app support custom DPI, because I can barely read the text as the app has fixed his size "manually" so the text overflow the space dedicated to it

Make something to check if the app works properly (maybe dialog box, pop up, state check page etc...), something to say if the app is correctly setted to start at system start and to say if it works acutally or not (because I checked "scheduled" and I'm in time to get light theme and nothing changes, and the app says nothing, I don't even know if it runs, if it's correctly configured, setted in system settings, idk, I don't even have any buttons to set those things if they aren't actually setted, I just don't know, from my pov this application is no more than a GUI test as it do nothing)

(apparently the app doesn't start to work as you check "schedulded", you have to click on either Dark or Light for the application to awake and set the time based configuration)

Add support to browser plugins that switch page dark light (because it stays as it is so it's not setted accordingly), the Yin Yang Windows equivalent support those plugins

Add support for time based wallpaper (so wallpaper can switch between, like, 5 states, for example, and not just 2 states, so we have different time of the day)

Add support for browsers themes (many already have dark light mode, some other works with personalized themes)

Maybe in the long term, merge your work with KDE team so those settings will be configurable in system settings and will be part of KDE

In the settings write where light themes should be setted and where dark theme should, because we have no clues where to do that

oskarsh commented 3 years ago

Thanks for your feedback, @bphd. I realised this issues a while ago and I am working on this by rewriting this tool with Flutter / Dart. Working with QT / Python, trying to support all Desktop Environments (not just KDE) is a big hassle, Wayland, custom DPI and packaging a binary is another pain point. I am lacking the manpower or developer skills to support all in a best practice manner. I can cut down on most of the problems by rewriting it with another tech stack making it more future proof and allowing it to package it in a modern manner.

Most of the bugs will be fixed with this rewrite.

Regarding the browser plugins, there is no universal solution for this. I got in contact with the popular extension Dark Reader and will try to support it but probably not in the first round of the rewrite. Firefox theming will be added since this is less effort.

I will not merge my work with KDE since I want this to be a standalone tool so I can act more freely for example supporting VSCode, Gnome and a bunch of other stuff.

Having a indicator what is light / dark is really good UI feedback, I will keep this in mind.

Thank you for the Review / Feedback.

l0drex commented 3 years ago

Regarding the browser plugins, there is no universal solution for this. I got in contact with the popular extension Dark Reader and will try to support it but probably not in the first round of the rewrite. Firefox theming will be added since this is less effort.

Firefox syncs its theme with the system if you use the default theme. You might need to install xsettingsd. For any other theme, I'm developing a browser plugin for that (Link). It works together with the communicate.py script. Source code is available over here.

DarkReader can be synced with the browser preferences, which should be synced with the theme (it works for the default dark and light theme): Three dots next to the toggle for on / off -> a popup for automation opens -> click use system colors

bphd commented 3 years ago

Thanks for your kind, complete and fast reply

I didn't knew about the GUI framework thing. I was searching for weeks which is the "best" one and Qt was pretty seducting, but apparently the future is in using web GUI because of their universal support, thanks for the tip!

And yes, changing platform and making it future proof is definitively the best choice to make, it's the choice who has the best return of work ratio

I was suggesting to merge with KDE (for example) because for me, those cosmectics options should be packaged per default, like in OS X. So yeah, even if you don't help the KDE community on that, I think that it should work on it soon hopefully

For the browser plugin theres no universal solution yeah, but like I said, your Windows equivalent support it. It means that theres a sort of API, interface of communication for that already existing, so the work should not be as big as you expect. And as long ad you support at least one, it means that your program can fully work in a certain configuration. And that is the important point, even if it don't work with any existing configuration

For the browser support I suggest you to follow the browser usage statistics on linux, working first on the most used, and then the second one etc... So you will support the most cases without "much" work. I'm personally on Firefox but I prefer that the soft work with the most users first

About the user friendly installation, I (personally) think that you shouldn't focus on that or even drop that, and let the community make installers for you. Because on my example, I didn't even use all your work done to make it an app image, I use it raw from git pull, and all of that automatically with one command paru -Syu yin-yang-git. All of that to say if you want to support all installation methods you will waste all your time on that, and if you want to support only one, most user will not use it because they will prefer using the OS method and be willing to adapt git repository themselves to do so. So currently with this logic you only support appimage based os (rawhide i think, elementary too i think, a little bit ubuntu, maybe alpine, but yeah)

And I appreciate your dedication on your work. Often when an independant soft needs a full rewrite, the author just abandon it and nobody takes the work after him, so all his work is ditched to oblivion because not compatible with the new oses

bphd commented 3 years ago

Regarding the browser plugins, there is no universal solution for this. I got in contact with the popular extension Dark Reader and will try to support it but probably not in the first round of the rewrite. Firefox theming will be added since this is less effort.

Firefox syncs its theme with the system if you use the default theme. You might need to install xsettingsd. For any other theme, I'm developing a browser plugin for that (Link). It works together with the communicate.py script. Source code is available over here.

DarkReader can be synced with the browser preferences, which should be synced with the theme (it works for the default dark and light theme): Three dots next to the toggle for on / off -> a popup for automation opens -> click use system colors

I messed a little bit between OS theme, personalized theme and light dark theme, and actually Firefox doesn't change it's color with the system, I should try that

I will maybe ask the AUR to add this dependency to the yin-yang package

Didn't knew about the dark reader automation, it's neat, theres even a time based option, so it switches without needing all the os synchronization, thanks

l0drex commented 3 years ago

I should add that the live theme change is a bit buggy when using the Firefox default theme and breeze, but it definitely works if you restart Firefox after every system theme change.

bphd commented 3 years ago

I should add that the live theme change is a bit buggy when using the Firefox default theme and breeze, but it definitely works if you restart Firefox after every system theme change.

Maybe a ticket should be raised at mozilla to support live theme changing, at the era where OS X entirely changes at live, I think we need this support

l0drex commented 3 years ago

Maybe a ticket should be raised at mozilla to support live theme changing, at the era where OS X entirely changes at live, I think we need this support

Well it has the support, and it works great if you don't use the breeze GTK theme. The thing with breeze GTK is that it's only one theme and syncs its colors with the Qt scheme. Somehow Firefox doesn't like this. When changing the Qt scheme, it sometimes works, but sometimes some parts get dark while some others stay white.

bphd commented 3 years ago

Maybe a ticket should be raised at mozilla to support live theme changing, at the era where OS X entirely changes at live, I think we need this support

Well it has the support, and it works great if you don't use the breeze GTK theme. The thing with breeze GTK is that it's only one theme and syncs its colors with the Qt scheme. Somehow Firefox doesn't like this. When changing the Qt scheme, it sometimes works, but sometimes some parts get dark while some others stay white.

Okay but if we use default Breeze from KDE, it's okay?

l0drex commented 3 years ago

Okay but if we use default Breeze from KDE, it's okay?

It works unless you switch to dark / light mode while Firefox is running. If you do, you have to restart Firefox to fully apply the theme.

oskarsh commented 3 years ago

@bphd I am rewriting this application with flutter which is no web tech at all. Its more like a game engine that runs cross platform and abstracts the nitty gritty details away from the developer unlike QT. Flutter will be well supported by ubuntu in the current latest release and is getting support from canonical.

The package for the init release will be a Snap package and later on also be available as a system package as well. I reached out to many developers to get help to package this app for different distributions but got no help for that except from the Arch community.

For the Browser plugin, there is a OS wide API that exposes what theme or mode is currently used however this is only implemented on gtk / gnome based desktops. Currently there is nothing like this on KDE. See this reddit post for more details.

The live theme changing of the browser is also a bit buggy on chromium based browsers, sadly there is nothing I can do about it exceot to restart the browser for the user but decided against it for UX reasons.

@l0drex thanks for developing the browser extensions

eeickmeyer commented 3 years ago

I am lacking the manpower or developer skills to support all in a best practice manner.

@oskarsh Hi there! I'm the project leader of Ubuntu Studio, the Director of User Experience and Packaging for the Kubuntu Focus brand of high-power notebook computers, an Ubuntu MOTU, and member of the Ubuntu Community Council. I'm giving my credentials to paint a picture about what you need to do to minimize your workload.

First, your project is great. I use it daily, and it helps to have my theme transition from light to dark. However, I feel as though you're putting the burden of system installation on yourself more than you should. That's for packagers, like myself, to worry about. All you must do is make sure that your application can be compiled and installed to the proper locations, not that you must do that part yourself mostly. For instance, the executable goes to /usr/bin, the .desktop file to /usr/share/applications, and the icon to /usr/share/pixmaps or /usr/share/icons. But I digress.

I'm more than happy to package this and submit it for inclusion to Ubuntu. Much of my work also makes it upstream to Debian, so there's an even broader audience. And, if necessary, I'm a Fedora packager as well.

All that to say, with the right help and inclusion in other projects, you'll find that help will come. I can help with getting over the hurdle of distro inclusion. The other stuff happens because of people seeing your work and wanting to help make it better, which you must be open to. This includes issues and pull requests. If there's one thing I learned over the years, it's that you can't do it alone.

bphd commented 3 years ago

I know you will re write everytihng, but just to say. You applies theme colors but it overrides Kvantum colors if we set a Kvantum theme in your soft My workaround was to ln all themes to Kvanum.colors, but it's not that good because it sets the theme before applying it so it makes it worse

chase9 commented 1 year ago

Hey @oskarsh, I started working on trying to package this with flatpak when I saw your Flutter branch. I've been using Flutter a bit myself and would be happy to help. I would agree that Flutter compiling into an easy binary and snap package is ideal.

chase9 commented 1 year ago

Also, I would advocate for this issue to be closed. There are 5 different requests in one, and I think at least the scheduled request has been fixed with systemd support.

bphd commented 1 year ago

Also, I would advocate for this issue to be closed. There are 5 different requests in one, and I think at least the scheduled request has been fixed with systemd support.

And the other request to just be forgot?

chase9 commented 1 year ago

No, you should split your requests into separate issues so they're easier to discuss. It makes is much easier on the maintainers :)

bphd commented 1 year ago

It isn't completed if all request hasn't been adressed

l0drex commented 1 year ago

I apologize if I overlooked something, but from my perspective everything is resolved: