Wednesday, April 26, 2017

QT/Plasma 5 Apps theme under Gnome 3.22

BACKGROUND: I used to be a big fan of KDE - all the features and control over nearly every aspect of the desktop - I found that really appealing.  Unfortunately I also found that it was relatively buggy usability suffered.  I switched to Gnome 3.X which I didn't really feel drawn to - I'm not a big fan of (we don't think you should have that control) - type of software; that's why I use Linux and not Apple.  Nevertheless, KDE was becoming very difficult to use in a real world work environment as I found I was spending more time fixing problems or finding workarounds than doing any actual work; Gnome solved that problem for me

There are some applications that the KDE theme developed which I simply cannot work without:  Konsole, Dolphin, Kompare, Ksnapshot, Kwrite and the list goes on...

Here's where things start to get tricky.  With the most recent version of Fedora (Fedora 25), Gnome and KDE applications tend to look rather ugly and broken, especially Dolphin, again making them nearly unusable.

As usual, ArchWiki came to the rescue:

https://wiki.archlinux.org/index.php/qt#Configuration_of_Qt5_apps_under_environments_other_than_KDE_Plasma

So here are my notes on how I got all my KDE apps looking GREAT under GNOME, with the KDE themes mind you.  It's all taken from the wiki really.

CONFIGURATION:

(BTW: I use the GNOME Dark Theme to reduce the strain on my eyes).

Set QT_QPA_PLATFORMTHEME variable in ~/.bash_profile

vim ~/.bash_profile

...
export QT_QPA_PLATFORMTHEME="qt5ct"

Next I ran qt5ct which is the Plasma 5 theme configuration tool:

qt5ct

When it opens up it has multiple tabs:


I set the style to "Breeze" as it is closest to the Gnome Dark Theme.

Next are the Icon Theme, I found that dolphin has trouble with the "Adwaita" icons (some icons were completely missing from Dolphin), so I switched it to "Breeze dark." While they don't match Gnome's, at least they are all there.

Apply the changes...

Restart my Gnome session to ensure the environment variable is available globally.

And start any KDE app.  The result is perfect!   Below is a screenshot of Kwrite with the breeze colour scheme:


Other aspects of Plasma 5 can be modified using kcmshell5 and providing a module, for example:

/usr/bin/kcmshell5 kwinoptions

For a list of modules:

/usr/bin/kcmshell5 --list

Finally, this isn't a rant against either KDE or GNOME.  They both have qualities and faults; what I really like is that they actually work together.