5

I have selected breeze dark color for KDE applications via systemsettings5. When i run plasma, the dark thems applies properly, but when I run i3 it shows white theme. Can KDE themes be applied to KDE apps when running in non-kde windows managers?

systemsettings5

breeze-dark-theme

breeze-dark-colors

wildnux
  • 193
  • 1
  • 6

3 Answers3

5

Set QT_QPA_PLATFORMTHEME="qt5ct" andQT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/

Use qt5ct to set a theme.

I set it like that in my .xprofile:

if [ "$XDG_CURRENT_DESKTOP" = "i3" ]; then
    export QT_QPA_PLATFORMTHEME="qt5ct"
    export QT_PLUGIN_PATH=$HOME/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/
fi
Horus
  • 151
  • 1
4

I had similar problems and found this somewhat related bugtracker entry. There doesn't seem to be a convincing solution, I work around this by faking my desktop environment to be KDE. Give adding XDG_CURRENT_DESKTOP=KDE to your .xprofile a try and see what happens.

Marcus Riemer
  • 310
  • 3
  • 12
  • 1
    Thanks, I had to use the following in .profile to make it work: ``` if [[ $DESKTOP_SESSION=~"^i3.*$" ]]; then #export DESKTOP_SESSION="gnome" export DESKTOP_SESSION="kde" export XDG_CURRENT_DESKTOP="KDE" fi ``` – wildnux Apr 14 '16 at 00:32
4

The solution by @Horus is also covered in the Arch Linux wiki: Configuration of Qt5 apps under environments other than KDE Plasma

Another solution is provided by the qt5ct package, which provides a DE independent Qt5 QPA and a configuration utility. After installing the package, run qt5ct to set an icon theme, and set the environment variable QT_QPA_PLATFORMTHEME="qt5ct" so that the settings are picked up by Qt applications. Alternatively, use --platformtheme qt5ct as argument to the Qt5 application.

To automatically set QT_QPA_PLATFORMTHEME for user session, add the following line to ~/.xprofile.

[ "$XDG_CURRENT_DESKTOP" = "KDE" ] || [ "$XDG_CURRENT_DESKTOP" = "GNOME" ] || export QT_QPA_PLATFORMTHEME="qt5ct"
simon04
  • 151
  • 1
  • 3