Conky-for-macOS / conky-for-macOS

macOS port of the Light-weight system monitor for X.
https://github.com/Conky-for-macOS/conky-for-macOS/wiki
GNU General Public License v3.0
152 stars 9 forks source link

WLAN completely unsupported #17

Closed npyl closed 6 years ago

npyl commented 6 years ago

The build option BUILD_WLAN is only available for Linux.

~We either need to provide an option BUILD_DARWIN_WLAN or~ patch the original code and keep BUILD_WLAN

npyl commented 6 years ago

I chose to patch the original code to make BUILD_WLAN available for all OS. It is also set to OFF by default for backwards-compatibility. This should be the optimal behaviour.

See commits: 800992d1559950701e75c40e477565643df1fddb, 504d27c8764cb05b9f5533ad89013876c7202972, 51f5350392b153b1edcbf600f740c02415c9aea4.

npyl commented 6 years ago

For macOS there are some options: (Apple doesn't really want you to know WIFI stuff 👻)

First option means calling Obj-C somehow in our C++ project. (Probably convert darwin.cc to darwin.mm 😂)...

Second option means using pipes / parsing and ugly and tedious code just to get an essid and other information.

Third option means reverse-engineering, (this can help), probably later dealing with obsolete APIs, but too much fun.


Right now, the idea is finding a way to call Obj-C functions in conky in order to acheive No. 2


Though I could use this which will probably work.

npyl commented 6 years ago

082076a has been deleted. I decided not to go with this approach. Instead I am going to rename darwin.cc to darwin.mm and thus enable Objective-C++ and CoreWLAN.framework

npyl commented 6 years ago

This can now be closed as I have pretty-much done what I could to implement WLAN stats. They may be completely wrong but the solution may be one step away...

I am not well-versed with WLAN terminology / theory thus I cannot provide better implementation.

The work can be seen in the wifi branch.

More patches may come in the way but this can be considered done :)

npyl commented 6 years ago

@matmunn Hi Mat, could you please take a look in my code for WLAN? I really don't know anything about WLAN terminology (haven't yet gone to uni) and don't really understand anything around the internet.

If you don't know either thats ok 😄

matmunn commented 6 years ago

Looks ok to me, from what I understand

npyl commented 6 years ago

@matmunn Thanks Mat!