home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

dunst: generate an icon_path valid for all theme sizes

Open teto opened this issue 3 years ago • 2 comments

Description

I've started trying to set icons for my dunst notifications and found out that icons packages contain different icons for different sizes. The current dunst module allows for one size only (the user can override it but it's a bit complex): https://github.com/nix-community/home-manager/blob/684e85d01d333be91c4875baebb05b93c7d2ffaa/modules/services/dunst.nix#L168 I think we should generate an entry for every size by default ?

for instance I set

	iconTheme = {
		package = pkgs.papirus-icon-theme;
		name = "Papirus";
		# size = "symbolic"; # try with/wihout it
	}; 

With size set to symbolic notify-send --icon=audio-volume-low-symbolic toto works otherwise it doesnt. One can use absolute path to the icon too.

teto avatar Jun 05 '22 09:06 teto

Would dunst's new enable_recursive_icon_lookup help with this?

ncfavier avatar Jun 14 '22 23:06 ncfavier

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.

stale[bot] avatar Sep 13 '22 04:09 stale[bot]

@ncfavier I believe it does fix this.

I was having trouble with dunst icons. I ended up changing my dunst config to use the new recursive lookup. It's much simpler than the icon path logic that was used before.

Here is my config https://github.com/BerkeleyTrue/dotfiles/blob/master/.config/home-manager/modules/desktop/services/dunst.nix#L94

The relevant bits:

      enable_recursive_icon_lookup = true;
      icon_theme = "Dracula,hicolor";

This also required some changes to my systemd setup, since the recursive lookup requires xdg_data_dirs to be picked up correctly or it won't find ~/.nix-profile/share. The changes were an addition of a `~/.config/systemd/user.conf' that would duplicate the xdg_data_dirs directory.

https://github.com/BerkeleyTrue/dotfiles/blob/master/.config/home-manager/modules/desktop/services/default.nix#L23

  xdg.configFile."systemd/user.conf".text = ''
    [Manager]
    ManagerEnvironment="XDG_DATA_DIRS=%h/.nix-profile/share:%h/.local/share:/usr/local/share:/usr/share"
    DefaultEnvironment="XDG_DATA_DIRS=%h/.nix-profile/share:%h/.local/.share:/usr/local/share:/usr/share"
  '';

This setup is probably doable with the current services.dunst module, but the module will still add the unnecessary icon_path which I don't think there is a way to overwrite.

BerkeleyTrue avatar Oct 28 '23 23:10 BerkeleyTrue

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.

stale[bot] avatar Jan 27 '24 07:01 stale[bot]