View previous topic :: View next topic |
Author |
Message |
Amon2501 Tux's lil' helper
Joined: 12 Dec 2018 Posts: 131
|
Posted: Sat May 23, 2020 10:21 am Post subject: Breeze-DARK for KDE apps and light for GTK apps? |
|
|
Hello. i`m using Breeze-dark theme for kde and it looks ok for kde apps, but many GTK apps are using something like "gray on black" or "dark shades on black" and i dont like it. So i`ve decided to switch gtk apps to just regular breeze theme, while keeping dark for kde. That`s worked fine until the recent update 2 or 3 days ago. Now every app including gtk based are using the dark theme. Even if i explicitly switch gtk theme to just breeze, not the breeze-dark in the kde settings menu. There is a parameter in .config/gtk-3.0/settings.ini file
Code: | gtk-application-prefer-dark-theme= |
If set it manually to 0 it works exactly as i want - dark kde theme with light for gtk-apps. But the problem is it changes back to 1 every time i reboot or just logging off from the kde session. How can i set it to 0 permanent? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Sat May 23, 2020 1:48 pm Post subject: |
|
|
As I understand it, KConfig Modules (KCMs) edit the contents of the GTK config file to match the current settings in Plasma -- see https://phabricator.kde.org/D24743
So I think what is happening in your case is that KDE Plasma is overwriting your manual configuration and selecting the dark KDE theme for GTK applications since you specified the dark KDE theme for KDE applications in Plasma's System Settings.
My guess is that, to stop Plasma overwriting your manual settings every time you log-in to a Plasma session, you could try making the file ~/.config/gtk-3.0/settings.ini Read-Only. Worth trying, anyway.
EDIT: I suppose another approach would be to have a small Bash script to copy a file settings.ini.bak to ~/.config/gtk-3.0/settings.ini every time you login to Plasma. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Amon2501 Tux's lil' helper
Joined: 12 Dec 2018 Posts: 131
|
Posted: Sat May 23, 2020 2:46 pm Post subject: |
|
|
Setting that file read only works, but i think it could breed some other troubles in the future. Is there any "legal" way to unset that enforcing of the dark gtk theme? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Sat May 23, 2020 4:15 pm Post subject: |
|
|
Not that I know of, otherwise I would have mentioned it.
You could try configuring Plasma to copy the GTK3 settings file to a backup file when you logout of Plasma, then configure Plasma to copy the backup file to the GTK settings file when you login to Plasma again. In 'System Settings' > 'Startup and Shutdown' > 'Autostart' you can specify script files to run at Startup (login) and Logout. So you could create a couple of script files:
Code: | #!/bin/sh
#
cp /home/amon/.config/gtk-3.0/settings.ini /home/amon/.config/gtk-3.0/settings.ini.bak |
Code: | #!/bin/sh
#
cp /home/amon/.config/gtk-3.0/settings.ini.bak /home/amon/.config/gtk-3.0/settings.ini |
and then use 'System Settings' > 'Startup and Shutdown' > 'Autostart' to specify that the first would be launched at logout and the second would be launched at login.
EDIT: Or just have one script to edit the parameter you want, and configure 'System Settings' > 'Startup and Shutdown' > 'Autostart' to run it at Startup (login):
Code: | #!/bin/sh
#
sed -i 's/gtk-application-prefer-dark-theme=true/gtk-application-prefer-dark-theme=false/g' /home/amon/.config/gtk-3.0/settings.ini |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8936
|
Posted: Sat May 23, 2020 5:33 pm Post subject: |
|
|
Why not remove kde-plasma/kde-gtk-config? |
|
Back to top |
|
|
Amon2501 Tux's lil' helper
Joined: 12 Dec 2018 Posts: 131
|
Posted: Sun May 24, 2020 8:52 am Post subject: |
|
|
Thanks that autostart feature should do it. Removing kde-gtk-config btw makes me unable to set its fonts too, so i d better leave it installed |
|
Back to top |
|
|
|