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?
3 Answers
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
- 151
- 1
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.
- 310
- 3
- 12
-
1Thanks, 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
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
qt5ctpackage, which provides a DE independent Qt5 QPA and a configuration utility. After installing the package, runqt5ctto set an icon theme, and set the environment variableQT_QPA_PLATFORMTHEME="qt5ct"so that the settings are picked up by Qt applications. Alternatively, use--platformtheme qt5ctas argument to the Qt5 application.To automatically set
QT_QPA_PLATFORMTHEMEfor user session, add the following line to~/.xprofile.[ "$XDG_CURRENT_DESKTOP" = "KDE" ] || [ "$XDG_CURRENT_DESKTOP" = "GNOME" ] || export QT_QPA_PLATFORMTHEME="qt5ct"


