abaddon icon indicating copy to clipboard operation
abaddon copied to clipboard

Optionally use AppIndicator for system tray

Open trigg opened this issue 1 year ago • 2 comments

Adds extra codepath to use libappindicator to show system tray icon

Benefits:

  • Icon will show on wayland panels
  • Icon should show even when abaddon is running in a container ~(although I've not proven this with a test)~ Tested in distrobox
  • AppIndicator silently switches between itself and GTK StatusIcon depending on what panel is available

Downsides:

  • AppIndicator only uses a menu, no direct left-click callback

Other considerations:

  • I am completely unable to test this on Windows or Mac. I believe the conditional CMake setup won't break those but I know almost nothing about CMake.
  • I've successfully tested on Arch, Debian and Ubuntu. Both with and without libappindicator installed.
  • Code consistency. I tried to auto-format to keep it in line, but that only broke it more. Please point out corrections I must make.

Packaging:

  • Ubuntu/Debian apt install libappindicator3-dev
  • Arch pacman -S libappindicator-gtk3
  • Fedora untested

trigg avatar Jun 18 '24 14:06 trigg

is there any reason someone might want to not use appindicator even if they have it installed? idk if maybe it should have a cmake option

ouwou avatar Jun 21 '24 23:06 ouwou

I wouldn't say 'never' but as AppIndicator falls back to Gtk StatusIcon internally if there's no appindicator service to use, I'd argue it covers ground better (except for Mac/Windows)

trigg avatar Jun 22 '24 07:06 trigg