helloSystem / Menu

Global menu bar written in Qt
43 stars 14 forks source link

Add a way to manage WLAN #23

Closed probonopd closed 3 years ago

probonopd commented 3 years ago

Is there an existing tray application (ideally written in PyQt5) similar to https://anaynayak.github.io/buildnotify/ but for managing wireless networks?

grahamperrin commented 3 years ago

More broadly required: management of other network interfaces.

Shall I raise a separate issue for wired networking? Or would you like to broaden the title here?

probonopd commented 3 years ago

Let's have this one exclusively about wireless networks.

Wired networks should be automaticaly managed by DHCP.

probonopd commented 3 years ago

Please see the new Network.app in https://github.com/helloSystem/Utilities/tree/master/Utilities/ for a "tray icon" (application that lives in the global menu bar).

grahamperrin commented 3 years ago

Application names

image

Re: https://github.com/helloSystem/Utilities/issues/191 the name Network (in this screenshot) is too broad for an application that will not cover wired networking.

Documentation

I'll create a pull request for https://github.com/helloSystem/Utilities/blob/master/README.md

probonopd commented 3 years ago

Yes, at this point I undecided wherther we should put wired networks into the same menu. The Mac doesn't but e.g., Xfce does. Reference: https://github.com/helloSystem/Utilities/issues/191

Also, those "menu icons" type applications will likely be automatically launched by the system, so that the user never actually sees their name...

probonopd commented 3 years ago

Possbly(!) we should use https://github.com/ghostbsd/networkmgr/blob/master/src/net_api.py rather than calling wpa_cli directly? But then, just managing all things wireless with just one command is kind of intriguing. If we can get it to connect to the network...

kettle-7 commented 3 years ago

I'm just sending in a PR now that fixes it. It does:

I couldn't figure out how QProcess works, so it just uses Python's subprocess modules that they introduced in Python 3.5, but if someone could convert the code that's there to use QProcess that would be great.

https://github.com/helloSystem/Utilities/pull/62

probonopd commented 3 years ago

Thanks @linuxkettle that sounds very useful. Please see my comments in the PR. I am sure you'll figure out the QProcess given the code examples linked in the PR. Let me know if you stil need some help.

probonopd commented 3 years ago

@linuxkettle I can confirm that using your PR I can connect to wireless networks. Great work! :+1: Thank you. Please do see my comments in the PR.