nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.82k stars 1.78k forks source link

bug: waybar is missing gtk wrapping with systemd integration #2793

Open colemickens opened 2 years ago

colemickens commented 2 years ago

Is there an existing issue for this?

Issue description

I'm doing some fixing up of some sway-related stuff in HM and noticed that waybar's gtk seems to ignore my settings when run under systemd.

Maintainer CC

No response

System information

I'm on nixos-unstable, that command doesn't print anything for me.
colemickens commented 2 years ago

actually, it seems like everything is suffering from that, including portal-launched stuffs.

berbiche commented 2 years ago

waybar's gtk seems to ignore my settings when run under systemd

What settings do you mean?

colemickens commented 2 years ago

The GTK theme, for example. It's a bit unreliable though, yesterday I had it working a few times as well. I need to look into this more and add some more details.

berbiche commented 2 years ago

@colemickens do you have dconf.enable = true in your configuration? There's a hook that will automatically update your dconf settings and set the correct theme.

berbiche commented 2 years ago

You could try changing the GTK theme with dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita'" or gsettings set org.gnome.desktop.interface gtk-theme Adwaita. Waybar's interface should automatically update.

colemickens commented 2 years ago

Yes, I have the dconf in there, and I use the gtk.nix module as well. It seems like its working fine, I might've had some local state gtk.css or something interfering. I'll close for now.

(or it may've been one of the other little things I've fixed up elsewhere) closing for now.

colemickens commented 2 years ago

okay, yeah, my gsettings script is failing, it can't find the desktop schemas, so the gsettings commands aren't doing anything. I feel like I had fixed this somehow ages ago...

colemickens commented 2 years ago

yeah, I had disabled the gtk wrapper somehow. I think I got confused and thought the base wrapper was disabled (since hm/nixos has user dbus socket activation now), but in fact it's enabled by default and I still needed to opt into the gtk wrapper.

berbiche commented 2 years ago

Is there anything actionable on Home Manager's side?

oneingan commented 2 years ago

I have this same problem with every GTK3 app, GTK4 working well, when trying to change theme on the fly.

My hm config includes wayland.windowManager.sway.wrapperFeatures.gtk = true; and I launch dbus-run-session sway from greetd.

Also using portals in configuration.nix:

  xdg.portal = {
    enable = true;
    gtkUsePortal = true;
    extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
    wlr.enable = true;
  };

I then run gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark. But gtk3 apps ignore new theme.

I open an issue in nixpkgs https://github.com/NixOS/nixpkgs/issues/168485 but maybe is preferred to follow here.

nixos-discourse commented 2 years ago

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

stale[bot] commented 2 years ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

javacafe01 commented 1 year ago

I don't know if this is part of the issue, but icons in the taskbar are not found for apps when waybar is started with the systemd integration.

For example, here:

image

The three apps are firefox, wezterm, and wezterm. When running waybar like any regular program, without it starting from systemd, I get the app icons. With the integration, I get the picture above.

stale[bot] commented 1 year ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

Cu3PO42 commented 9 months ago

The above issue experienced by @javacafe01 can be worked around by importing PATH into the systemd user environment, either via systemctl --user import-environment PATH or dbus-update-activation-environment --systemd PATH or preferably the systemd integration of your favorite DE in HM.