bimlas / xfce4-night-mode

XFCE4 GenMon plugin: Switch between light and dark variants of a theme
86 stars 7 forks source link

Handle Xfce panel Dark-mode and also extra bash command #7

Closed mikachou closed 10 months ago

mikachou commented 1 year ago

I propose a commit from the fork I made from this project. On my repository I added two branches for modifications :

I merged these two branches in my own master branch, then now suggest to merge my master branch in your project.

bimlas commented 1 year ago

Sorry for the late reply.

Can you please show me screenshots about the issue with panels? I'm using XFCE 4.16 and the panels are changing colors as expected as you can see in the readme file.

I'm not sure that allowing users to run extra shell commands is still fits to purpose of this plugin, I have to think about this.

mikachou commented 1 year ago

Hi, Thanks for your reply.

About the panel I just wanted to be able to add some extra customization in case of, for some reason, a user want to use light mode with dark panel for example. Let's add screenshot to illustrate my point : Dark mode : Capture d’écran_2022-11-19_15-41-17 Light mode : Capture d’écran_2022-11-19_15-42-23 Light mode with dark panel : Capture d’écran_2022-11-19_16-21-25

That's why I added the ability to customize the xfconf xfce4-panels/panels/dark-mode property (boolean). This property is usually accessible for end-user with right-click on the panel > preferences > appearance (or look?), then there is a button to switch panel dark-mode on/off

Regarding the second point, the extra-command was added because some applications which don't use GTK as UI may not switch to light/dark theme (like some Qt apps) There are for instance a "Manjaro parameters" menu on Manjaro Linux, accessible through Xfce parameters. In order to make this window have the same look as the rest of the desktop I must add an extra-command to set kvantum with the right theme. To illustrate my point, let's suppose that we are switching from light theme to dark theme, then open the Manjaro parameter sub-menu from Xfce parameters. What we have with the kvantummanager extra command :

Capture d’écran_2022-11-19_15-51-03 What we have without the kvantummanager extra command : Capture d’écran_2022-11-19_15-52-03

In the second illustration, we can see that the Manjaro sub-menu has still the light-theme whereas the rest of the desktop has the dark-theme. Thus I added extra-command parameter to solve this issue.

Finally, but it may a bit off-topic, I also wondered if it may not be useful to have the ability to change desktop background while switching light/dark, but I haven't implemented yet, because I actually didn't really need it.

bimlas commented 10 months ago

Sorry for the late reply.

I have to decline this PR, because it's too specific modification in my opinion. We could add a lot of options to the script, because a lot of apps have day / night mode. Instead of making the script almighty, I let the user execute any command that he/she wants: https://github.com/bimlas/xfce4-night-mode#settings -> UserScript

EDIT

Just realized that I did almost the same with the UserScript as you did with EXTRACMD, so basically your PR was correct, I was inattentive, really sorry, it's late here. You can find instructions about changing the wallpaper in the readme.