[GH-ISSUE #84] Tray issues #1454

Closed
opened 2026-05-22 22:52:22 +01:00 by JakeStanger · 3 comments
Owner

Originally created by @dchinmay2 on GitHub (Mar 19, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/84

Describe the bug
When I use the tray icon from nm-applet,

  1. The icons don't get updated (for example the icon should become a lock when a VPN is enabled but this doesn't happen until I restart the bar)

  2. There are no checkboxes (each of the three vpn connections is supposed to have a checkbox to its left)
    Screenshot from 2023-03-19 at 16_37_27 951359431

  3. The bar crashes after some time of interacting with tray items:
    https://paste.sr.ht/~p00f/6c6afbfd14a1aacaee2ba6d49cb9e582323eded4

  4. Clicking buttons doesn't work in the main dropdown

To Reproduce
Steps to reproduce the behavior:

  1. Run nm-applet --indicator
  2. Right click the tray item, "Enable networking" and "Enable Wi-Fi" don't have checkboxes next to them.
  3. Clicking "enable networking" doesn't toggle network (clicking vpn connections > some connection does toggle that connect though)
  4. Interact with the menu items for some time, the bar crashes

System information:

  • Distro: Arch Linux
  • Compositor: River
  • Ironbar version: d4dd8 + my upower commit (I hope that's not relevant)

Configuration

Share your bar configuration and stylesheet as applicable:

Config
position: "top"
height: 25
start:
  - type: "focused"
    show_icon: true
    show_title: true
    truncate: "end"
center:
  - type: "clock"
    format: "%a %d            %H:%M"
end:
  - type: "upower"
    format: "icon:{icon} {percentage}%"
  - type: "tray"

Styles
.background {
    background-color: black;
}

#bar {
    background-color: black;
}


#focused {
    font-size: 17px;
    font-weight: bold;
}

#clock {
    font-size: 17px;
    font-weight: bold;
}

Originally created by @dchinmay2 on GitHub (Mar 19, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/84 **Describe the bug** When I use the tray icon from `nm-applet`, 1) The icons don't get updated (for example the icon should become a lock when a VPN is enabled but this doesn't happen until I restart the bar) 2) There are no checkboxes (each of the three vpn connections is supposed to have a checkbox to its left) ![Screenshot from 2023-03-19 at 16_37_27 951359431](https://user-images.githubusercontent.com/36493671/226171426-c1556dc4-beda-45b8-a336-30d3a2880cfd.png) 3) The bar crashes after some time of interacting with tray items: https://paste.sr.ht/~p00f/6c6afbfd14a1aacaee2ba6d49cb9e582323eded4 4) Clicking buttons doesn't work in the main dropdown **To Reproduce** Steps to reproduce the behavior: 1. Run `nm-applet --indicator` 2. Right click the tray item, "Enable networking" and "Enable Wi-Fi" don't have checkboxes next to them. 3. Clicking "enable networking" doesn't toggle network (clicking vpn connections > some connection does toggle that connect though) 4. Interact with the menu items for some time, the bar crashes **System information:** - Distro: Arch Linux - Compositor: River - Ironbar version: d4dd8 + my upower commit (I hope that's not relevant) **Configuration** > Share your bar configuration and stylesheet as applicable: <details><summary>Config</summary> ```yaml2 position: "top" height: 25 start: - type: "focused" show_icon: true show_title: true truncate: "end" center: - type: "clock" format: "%a %d %H:%M" end: - type: "upower" format: "icon:{icon} {percentage}%" - type: "tray" ``` </details> <details><summary>Styles</summary> ```css .background { background-color: black; } #bar { background-color: black; } #focused { font-size: 17px; font-weight: bold; } #clock { font-size: 17px; font-weight: bold; } ``` </details>
JakeStanger 2026-05-22 22:52:22 +01:00
Author
Owner

@JakeStanger commented on GitHub (Mar 19, 2023):

Thanks for the detailed report.

Paging @oknozor. This looks like the error is coming from stray. I am not sure if the other problems are ones you're aware of / looking at in #65?

<!-- gh-comment-id:1475224083 --> @JakeStanger commented on GitHub (Mar 19, 2023): Thanks for the detailed report. Paging @oknozor. This looks like the error is coming from `stray`. I am not sure if the other problems are ones you're aware of / looking at in #65?
Author
Owner

@oknozor commented on GitHub (Mar 20, 2023):

I am pretty sure this is related to the gtk view implementation, I had a similar issues trying to implement system tray for eww (see: https://github.com/elkowar/eww/pull/448). Unfortunately I short on time these days and lack the gtk-rs knowledge to fix this.

If I recall correctly this require a custom implementation of MenuModel. Maybe a a seasoned gtk developer could help here ?

<!-- gh-comment-id:1476801160 --> @oknozor commented on GitHub (Mar 20, 2023): I am pretty sure this is related to the gtk view implementation, I had a similar issues trying to implement system tray for eww (see: https://github.com/elkowar/eww/pull/448). Unfortunately I short on time these days and lack the gtk-rs knowledge to fix this. If I recall correctly this require a custom implementation of `MenuModel`. Maybe a a seasoned gtk developer could help here ?
Author
Owner

@JakeStanger commented on GitHub (Feb 1, 2024):

Apologies it took me so long to get round to this one, but I've finally had the time/patience to dive into this and give it the attention it deserves.

I've almost entirely rewritten the module, which fixes all of the above issues. I've also made some changes to the underlying library to fix a few issues, and the module should be much more robust now. It still isn't perfect, but it's a lot better than it was.

The rewrite should also come with some serious performance gains for the module. Previously the entire menu UI was recreated for every update (every image change is an update, which for nm-applet meant every animation of connecting/disconnecting), whereas now it will do a diff and efficiently update only what needs changing. It's ended up working in much the same way React does, which is kinda cool I guess.

<!-- gh-comment-id:1922306995 --> @JakeStanger commented on GitHub (Feb 1, 2024): Apologies it took me so long to get round to this one, but I've finally had the time/patience to dive into this and give it the attention it deserves. I've almost entirely rewritten the module, which fixes all of the above issues. I've also made some changes to the underlying library to fix a few issues, and the module should be much more robust now. It still isn't perfect, but it's a *lot* better than it was. The rewrite should also come with some serious performance gains for the module. Previously the entire menu UI was recreated for every update (every image change is an update, which for `nm-applet` meant every animation of connecting/disconnecting), whereas now it will do a diff and efficiently update only what needs changing. It's ended up working in much the same way React does, which is kinda cool I guess.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#1454
No description provided.