You are not logged in.

#1 2024-09-11 07:13:57

LikeABox
Member
Registered: 2024-09-11
Posts: 1

Logging into i3 changes gnome app themes

I first started using Linux (specifically Arch) about half a year ago. I first used the gnome desktop environment and everything seemed to work fine regarding themes, but I then switched over to i3.

Switching to i3 caused all of the Gnome apps that I use (mostly calculator and sometimes files or calendar) to stay in light theme. I initially tried fixing the issue, but since it wasn't something that I could fix in a few minutes of playing around and trying the online solutions, I ignored it.

That brings me to yesterday and this morning, where I spent a few hours trying whatever I could to get the gnome apps to adopt a dark theme.

I tried changing environment variables, using lxappearance, altering my i3 config, changing gnome settings through the command line, and whatever else I could find on forums, as well as a few suggestions from ChatGPT.

In the end, the only thing that seemed to work is rebooting my machine and logging into Gnome.

I'm not too familiar with Linux, and given what I've heard, I always thought that logging out of your current session was largely equivalent to a restart. You can then imagine my surprise when restarting my machine, logging into and out of i3, and then logging back into gnome reverted the apps all to a light theme again. In short, when I log into Gnome first  (off of a reboot), the themes work correctly. As soon as I log into i3, the themes are light and stay light, even when logging back into gnome, unless I reboot.


I'm not sure which information would be useful for troubleshooting, so I'll add a few lines from my .config/gtk and my i3 config.

gtk-4.0

[Settings]
gtk-application-prefer-dark-theme=1
gtk-theme-name=Adwaita:dark
gtk-icon-theme-name=Breeze
gtk-font-name=Cantarell 11
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=none
gtk-modules=canberra-gtk-module

gtk-3.0

[Settings]
gtk-application-prefer-dark-theme=1
gtk-theme-name=Adwaita:dark
gtk-icon-theme-name=Breeze
gtk-font-name=Cantarell 11
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=none
gtk-modules=canberra-gtk-module

i3 config (only the code relating to Gnome)

# Restore GNOME's settings
exec --no-startup-id /usr/libexec/gnome-settings-daemon-localeexec

# Fix a bug in gnome-settings-daemon: http://feeding.cloud.geek.nz/posts/creating-a-modern-tiling-desktop-environment-using-i3/
exec --no-startup-id dconf write /org/gnome/settings-daemon/plugins/cursor/active false

# Copying gnome settings (such as system theme)
exec --no-startup-id /usr/lib/gsd-xsettings

.bashrc

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

source /usr/share/fzf/key-bindings.bash
source /usr/share/fzf/completion.bash

cbonsai -p

alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '

export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export CLUTTER_IM_MODULE=fcitx
export SDL_IM_MODULE=fcitx
export GLFW_IM_MODULE=ibus

# Set the GTK theme to dark
export GTK_THEME=Adwaita:dark

.bash_profile

#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc
export GTK_THEME=Adwaita:dark

This is my first time posting on the forum, so please let me know if there's something that I did wrong. Since I'm a Linux noob, it's also very likely that some of what I have in my files is redundant or unnecessary, so please let me know if you see anything that you would change!

Thanks a lot for helping me out; I really want to fix this issue that has been bugging me for months wink

Offline

Board footer

Powered by FluxBB