-
Notifications
You must be signed in to change notification settings - Fork 88
feat: rework networkmanager module #1233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: rework networkmanager module #1233
Conversation
|
Does this superseed #690? |
|
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. |
|
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:
|
JakeStanger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/modules/Networkmanager.md
Outdated
| | `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. | |
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
f1d2919 to
574d343
Compare
- 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.
So they don't merge into doc-comments, making them harder to read.
6aec31c to
11bccfd
Compare
e2df1e3 to
5ddf6c4
Compare
275282e to
c6ed09a
Compare
JakeStanger
left a comment
There was a problem hiding this 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
JakeStanger
left a comment
There was a problem hiding this 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.
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
#148