Difficulty: ★☆☆☆☆
I use 2 Flatpaks on my system, Skype and Spotify. Yes, I know that they are in the AUR. The Flatpak versions work the best for me. The one thing that I do not like about Flatpaks, is how they ignore my GTK theming preferences that I have set in the Plasma Settings. The official solution from the Flatpak devs, is to install the wanted theme as a Flatpak. I personally think this solution is not ideal. Why have two versions of a theme installed just to fix a limitation inherent in the Flatpak system? Also, what if the theme you are using is not in the Flathub repo? For example, the theme I use for both QT and GTK applications on my KDE Plasma install, is the Dark-openSUSE
theme. It is not available in the Flathub repo. It can be found here: Qt Theme and GTK Theme.
Solution #1
After some research, I found a quick and easy fix. The downside is that you need to do it for every Flatpak you have installed.
- Copy the following file,
~/.config/gtk-3.0/settings.ini
- Create a
gtk-3.0
folder in the Flatpak program’s install folder. It is located at~/.var/app/(name of program)/config/
- Paste the
settings.ini
file into the folder you created above.
Solution #2
There is a script that can “automate” the process. It works great. You can find it here, as well as below.
flatheme.sh
#!/usr/bin/env bash
for dir in $HOME/.var/app/*/
do
confdir="${dir}config/gtk-3.0"
mkdir -p $confdir
cp $HOME/.config/gtk-3.0/settings.ini $confdir/settings.ini
done
To use the above script, do the following:
- Copy the above text.
- Open your favorite text editor.
- Paste the text from the above script into your text editor.
- Save the above file to your home folder or a folder of your choice. I personally named the file
flatheme.sh
- Open a terminal window and navigate to where you saved the above script to.
- Make your new script executable by typing:
chmod a+x flatheme.sh
- Run the script by typing
./flatheme.sh
You will only have to do one the above solutions right after installing a Flatpak. Updating the Flatpak will not undo the changes done.
Here are a couple of screenshots showing the results.
Spotify over Dolphin
Dolphin over Spotify