Instructions for enabling dark theme (almost) everywhere on ElementaryOS
- Replace the contents of
/usr/share/dbus-1/interfaces/io.elementary.pantheon.AccountsService.xmlwith this file. - Replace the line
<annotation name="org.freedesktop.Accounts.DefaultValue" value="0"/>with<annotation name="org.freedesktop.Accounts.DefaultValue" value="1"/>under PreferColorScheme section.
cat > $HOME/.config/gtk-3.0/settings.ini <<-EOF
[Settings]
gtk-application-prefer-dark-theme=1
EOF
cat > /etc/profile.d/gtk-theme.sh <<-EOF
export GTK_THEME=elementary:dark
EOF
-
Install Kvantum
Kvantum can be used to style Qt apps. Papirus Team maintains a PPA containing recent versions of
qt5-style-kvantumandqt5-style-kvantum-themespackages:add-apt-repository ppa:papirus/papirus apt install qt5-style-kvantum qt5-style-kvantum-themes -
Set
QT_STYLE_OVERRIDEvariable tokvantum:echo "export QT_STYLE_OVERRIDE=kvantum" > /etc/profile.d/qt-style-override.sh -
Restart your session, run Kvantum and choose a dark theme that matches the current ElementaryOS dark theme
I personally like
KvGnomeDarktheme but for some reason, it doesn't have dark title bars! That can be fixed by creating a modified version of the theme using Kvantum Manager app:- From Change/Delete theme section, select KvGnomeDark and click on Use this theme button
- In Configure Active Theme section, click the Save button. Doing so will create a config file in
$HOME/.config/Kvantum/KvGnomeDark#/KvGnomeDark#.kvconfig - Edit the abovementioned file and add the line
dark_titlebar=trueanywhere under the[%General]section
This Plank theme matches the ElementaryOS's default dark theme.
Make sure to restart your session after making the changes
to Undoo