Skip to content

Conversation

@Rodrigodd
Copy link
Contributor

@Rodrigodd Rodrigodd commented Nov 4, 2025

  • Allow a dynamic number of devices.
  • Show WiFi connection strength and update in real time.
  • Allow configuring the icons.
  • Show network info as tool-tip.
  • Allow whitelist/blacklisting device names/types.

I only have a WiFi and Wireguard interfaces, so I was unable to test other device types, but I tried to preserve the existing functionality as much as I could.

Screenshot

Screenshot from 2025-11-04 18-29-04

#148

@JakeStanger JakeStanger changed the title feat: reword networkmanager module feat: rework networkmanager module Nov 7, 2025
@JakeStanger JakeStanger added this to the 0.19.0 milestone Nov 7, 2025
@JakeStanger
Copy link
Owner

Does this superseed #690?

@Rodrigodd
Copy link
Contributor Author

Oh, I guess so. I didn’t notice that @Zedfrigg was already working on a reword of his network manager module implementation.

Compared with #690, my PR appears to have more features. The only area I think my PR is lacking is in how I’m passing events between the Client and the Module. My PR sends the entire list of devices whenever a device changes, and future events refer to devices by index, whereas #690 uses an ID system.

@Zedfrigg
Copy link
Contributor

Zedfrigg commented Nov 9, 2025

Hi there! This seems pretty in line with the features I implemented or plan to implement in my PR. I'm away from home at the moment and don't have the opportunity to read through your code in detail until a couple of days from now, so instead I'll leave you with some of the considerations I've encountered while implementing this myself:

  • Handling initialisation of more module instances (e.g. new monitor plugged in) correctly when already running
  • Handling the addition and removal of network devices (e.g. usb ethernet adapters)
  • Doing all of this without leaking memory or leaving unused tasks running

Copy link
Owner

@JakeStanger JakeStanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hard work.

I think we'll go with this over #690, pending a review from @Zedfrigg - I'd want to make sure we don't lose anything from there.

There's some initial things I've spotted in review, if you can have a look at those for me please.

| `icons.wired.connected` | `string` | `icon:network-wired-symbolic` | Icon for connected wired device |
| `icons.wired.acquiring` | `string` | `icon:network-wired-acquiring-symbolic` | Icon for acquiring wired device |
| `icons.wired.disconnected` | `string` | `""` | Icon for disconnected wired device |
| `icons.wifi.levels` | `string[]` | `["icon:network-wireless-signal-none-symbolic", ...]` | Icon for each strengh level of a connected wifi connection, from lowest to highest. The default contains 5 levels. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Levels as an array may be more complex than necessary. It also adds a third approach to handling levels compared to other modules (battery, volume). A low/medium/high approach may be more accessible.

At the very least the full list of icons does need to be included in the docs. See how it's being handled in the inhibit module as example:

https://github.com/JakeStanger/ironbar/pull/1190/files#diff-20bab0fe763db2e74cc41455d0d53cdeaa00c9707c367e2c4fac3a1bde131bcfR13

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An array seemed to me to be the simplest option. GTK icon themes have five levels of wireless signal strength, and I would like to have all of them available. Do you prefer that I make a struct with five fields: none, weak, ok, good and excellent?
There’s also the option of making a map of thresholds like in the battery module, but that would be even more complex, and the current mapping is non-linear.

Please let me know which approach you prefer.

But, for now, I’ve moved the default array out of the table.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll get back to you on this one. #1235 is proposing yet another syntax so this needs standardising and I need to have a think about the best approach.

@Rodrigodd Rodrigodd force-pushed the feat-network-manager-rework branch from f1d2919 to 574d343 Compare November 11, 2025 19:46
@Rodrigodd Rodrigodd force-pushed the feat-network-manager-rework branch from 6aec31c to 11bccfd Compare November 11, 2025 20:24
@Rodrigodd Rodrigodd force-pushed the feat-network-manager-rework branch from e2df1e3 to 5ddf6c4 Compare November 13, 2025 17:33
@Rodrigodd Rodrigodd force-pushed the feat-network-manager-rework branch from 275282e to c6ed09a Compare November 19, 2025 18:23
Copy link
Owner

@JakeStanger JakeStanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few last minor mop-up bits and then, pending a quick test, I think we're there. Thank you

Copy link
Owner

@JakeStanger JakeStanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool all LGTM, pending a decision around the icon config syntax. I'll try and have a think about that and get back to you soon.

@JakeStanger JakeStanger added the Z:Review Required Pull request pending review label Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z:Review Required Pull request pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants