Skip to content

Instantly share code, notes, and snippets.

@fardjad
Last active December 18, 2023 05:23
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fardjad/a1ec470712150e8d3d67693911f5afb8 to your computer and use it in GitHub Desktop.
Save fardjad/a1ec470712150e8d3d67693911f5afb8 to your computer and use it in GitHub Desktop.
[How to Enable Dark Theme on ElementaryOS] Instructions for enabling dark theme (almost) everywhere on ElementaryOS #elementary #linux #dark

How to Enable Dark Theme on ElementaryOS

Instructions for enabling dark theme (almost) everywhere on ElementaryOS

Pantheon Apps

  1. Replace the contents of /usr/share/dbus-1/interfaces/io.elementary.pantheon.AccountsService.xml with this file.
  2. Replace the line <annotation name="org.freedesktop.Accounts.DefaultValue" value="0"/> with <annotation name="org.freedesktop.Accounts.DefaultValue" value="1"/> under PreferColorScheme section.

Source

GTK3 Theme

cat > $HOME/.config/gtk-3.0/settings.ini <<-EOF
[Settings]
gtk-application-prefer-dark-theme=1
EOF

Ref

Flatpak/Snap Apps

cat > /etc/profile.d/gtk-theme.sh <<-EOF
export GTK_THEME=elementary:dark
EOF

Ref

Qt Apps

  1. Install Kvantum

    Kvantum can be used to style Qt apps. Papirus Team maintains a PPA containing recent versions of qt5-style-kvantum and qt5-style-kvantum-themes packages:

    add-apt-repository ppa:papirus/papirus
    apt install qt5-style-kvantum qt5-style-kvantum-themes
    
  2. Set QT_STYLE_OVERRIDE variable to kvantum:

    echo "export QT_STYLE_OVERRIDE=kvantum" > /etc/profile.d/qt-style-override.sh
    
  3. Restart your session, run Kvantum and choose a dark theme that matches the current ElementaryOS dark theme

    I personally like KvGnomeDark theme 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:

    1. From Change/Delete theme section, select KvGnomeDark and click on Use this theme button
    2. In Configure Active Theme section, click the Save button. Doing so will create a config file in $HOME/.config/Kvantum/KvGnomeDark#/KvGnomeDark#.kvconfig
    3. Edit the abovementioned file and add the line dark_titlebar=true anywhere under the [%General] section

Source

Dock (Plank)

This Plank theme matches the ElementaryOS's default dark theme.

Notes

Make sure to restart your session after making the changes

@BAProductions
Copy link

to Undoo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment