Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK3 ignore theme change using gsettings #168485

Open
oneingan opened this issue Apr 13, 2022 · 4 comments
Open

GTK3 ignore theme change using gsettings #168485

oneingan opened this issue Apr 13, 2022 · 4 comments
Labels
0.kind: bug Something is broken

Comments

@oneingan
Copy link
Contributor

Describe the bug

Im running sway WM from 21.11 channel, when I change theme using gsettings CLI tool I expect GTK3 on-fly changing theme. Test GTK4 using gtk4-demo and works well.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Launch gtk3-demo and gtk4-demo (ie: nix-shell -p gtk4.dev --run gtk4-demo)
  2. Run gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark

Expected behavior

Both GTK3 and GTK4 apps change their theme.

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.17.1, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.7.0`
 - channels(root): `"nixos-21.11beta333771.8e6b3914626, unstable-21.11pre299378.db6e089456c"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@oneingan oneingan added the 0.kind: bug Something is broken label Apr 13, 2022
@berbiche
Copy link
Member

Besides GTK4 working and not GTK3, do you know if this combination of Gtk3 + sway ever worked in other Linux distributions?

IIRC I had to setup an xsettings daemon for Gtk3 applications (either running under Wayland or X11) to pick up the theme switch.

@oneingan
Copy link
Contributor Author

As far I understand from sway wiki, precisely the recommended workaround is using gsettings: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland/#setting-values-in-gsettings

Also in Archlinux wiki I read:

gsettings is queried for Wayland sessions. (...) Changes to this entry are instant and affect all GTK applications.

https://wiki.archlinux.org/title/Dark_mode_switching#gsettings

@berbiche
Copy link
Member

cc @colemickens who has/had the same issue in Home Manager

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/some-loose-ends-for-sway-on-nixos-which-we-should-fix/17728/16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants