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

0

3 Answers 3

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
0
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.

1
  • 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, 2016 at 0: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"
1
  • This answer was much easier to understand than Horus'.
    – iFreilicht
    Oct 28, 2020 at 17:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .