initial
This commit is contained in:
commit
74ae93a96e
1 changed files with 94691 additions and 0 deletions
73
_resources/dark theme i3.md
Normal file
73
_resources/dark theme i3.md
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
To set a global dark theme preference that modern Linux applications (GTK, Qt, Flatpaks, and Electron apps) automatically detect, you need to configure a few specific system flags. [1]
|
||||
Since you are running Cinnamon's underlying services alongside i3, applications look for XDG Desktop Portals, gsettings, and GTK/Qt system overrides to determine if the system is in dark mode.
|
||||
Here is how to set the global dark theme flags so your apps automatically adjust:
|
||||
## 1. Set the Global XDG Desktop Portal Flag (Most Important)
|
||||
Modern apps (including Flatpaks, Snap packages, Firefox, Chrome, and Electron apps) check the XDG Desktop Portal to see if the system prefers a dark layout. [2]
|
||||
Create or edit your local configuration file:
|
||||
|
||||
nano ~/.config/xdg-desktop-portal/settings.ini
|
||||
|
||||
Add the following lines to globally request dark appearance:
|
||||
|
||||
[org.freedesktop.appearance]
|
||||
color-scheme=1
|
||||
|
||||
(Note: 0 means default/no preference, 1 means prefer dark, and 2 means prefer light). [3, 4]
|
||||
## 2. Update the GSettings Framework
|
||||
Cinnamon and GNOME applications rely heavily on gsettings. Run these commands in your terminal to tell the system you prefer a dark color scheme and a dark GTK theme: [5, 6, 7]
|
||||
|
||||
# Tells modern apps to prefer dark layouts
|
||||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
# Sets the standard theme variant to dark
|
||||
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
|
||||
|
||||
## 3. Configure the GTK 3 & 4 Config Files
|
||||
Some standalone applications bypass GSettings and check configuration files directly. Ensure your GTK files explicitly mandate the dark variant. [8, 9]
|
||||
Open or create the GTK 3 configuration file:
|
||||
|
||||
nano ~/.config/gtk-3.0/settings.ini
|
||||
|
||||
Ensure it contains these exact lines:
|
||||
|
||||
[Settings]
|
||||
gtk-theme-name=Adwaita-dark
|
||||
gtk-application-prefer-dark-theme=1
|
||||
|
||||
Repeat this process for GTK 4 applications:
|
||||
|
||||
nano ~/.config/gtk-4.0/settings.ini
|
||||
|
||||
Ensure it contains:
|
||||
|
||||
[Settings]
|
||||
gtk-theme-name=Adwaita-dark
|
||||
gtk-application-prefer-dark-theme=1
|
||||
|
||||
## 4. Force Qt Apps to Mimic GTK
|
||||
Qt-based applications (like VLC, KeepassXC, or qBittorrent) ignore GTK configurations by default. To force them to use your global GTK theme settings, add environmental variables to your profile. [10]
|
||||
Open your environment configuration:
|
||||
|
||||
sudo nano /etc/environment
|
||||
|
||||
Add these lines at the bottom:
|
||||
|
||||
QT_QPA_PLATFORMTHEME=gtk2
|
||||
QT_STYLE_OVERRIDE=adwaita-dark
|
||||
|
||||
## 5. Apply the Changes
|
||||
For these global flags to take full effect across all running daemons, save your files and restart your i3 session (press Mod+Shift+R or log out and log back in). [11]
|
||||
Once you log back in, your apps will read the active global flags and auto-adjust to their dark variants.
|
||||
If any specific application still refuses to flip over, let me know the name of the app or if it is installed as a Flatpak/Snap, and I can give you the target command to fix it!
|
||||
|
||||
[1] [https://www.baeldung.com](https://www.baeldung.com/linux/gtk-applications-dark-theme)
|
||||
[2] [https://www.reddit.com](https://www.reddit.com/r/xfce/comments/11pjosp/how_to_make_xfcefirefox_announce_light_dark_mode/)
|
||||
[3] [https://discussion.fedoraproject.org](https://discussion.fedoraproject.org/t/gnome-some-applications-launched-as-root-do-not-follow-dark-theme/78329)
|
||||
[4] [https://github.com](https://github.com/flatpak/xdg-desktop-portal/issues/629)
|
||||
[5] [https://blog.elementary.io](https://blog.elementary.io/dark-style-progress/)
|
||||
[6] [https://www.reddit.com](https://www.reddit.com/r/linuxmasterrace/comments/yubcik/does_anyone_know_how_to_change_the_default/)
|
||||
[7] [https://github.com](https://github.com/hyprwm/Hyprland/discussions/5867)
|
||||
[8] [https://github.com](https://github.com/linuxmint/cinnamon/issues/12994)
|
||||
[9] [https://orioninsist.medium.com](https://orioninsist.medium.com/true-system-wide-dark-mode-on-sway-wayland-e88c5226a22d)
|
||||
[10] [https://www.reddit.com](https://www.reddit.com/r/Ubuntu/comments/qbam6e/why_isnt_dark_theme_working_on_all_application/)
|
||||
[11] [https://forum.manjaro.org](https://forum.manjaro.org/t/changing-theme-appending-colour-palettes-in-config/58845)
|
||||
|
||||
Loading…
Reference in a new issue