Skip to content
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

Mac Address in Network Module #2568

Closed
Camerooooon opened this issue Jan 12, 2022 · 2 comments · Fixed by #2569
Closed

Mac Address in Network Module #2568

Camerooooon opened this issue Jan 12, 2022 · 2 comments · Fixed by #2569

Comments

@Camerooooon
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I'm unable to easily show my mac address in the internal/network module type

Why does polybar need this feature?

It will allow people to easily see their current mac address without the need for a custom script.

Describe the solution you'd like

There already exist things like %ifname% and %local_ip% which show information about the current network. How about adding %mac_addr%

Describe alternatives you've considered

Creating a custom script in order to read the output of /sys/class/net/<interface>/address however this solution doesn't allow me to put my mac address in my network module's text

Additional context

In order to get the mac address of a certain interface you can read the directory /sys/class/net/<interface>/address

@patrick96
Copy link
Member

Good idea!

PRs are welcome :)

This should be a straight-forward change for both C++ and polybar newcomers.

Add the mac address to the link_status struct in include/adapters/net.hpp and populate it in network::query

@Camerooooon
Copy link
Contributor Author

Good idea!

PRs are welcome :)

This should be a straight-forward change for both C++ and polybar newcomers.

Add the mac address to the link_status struct in include/adapters/net.hpp and populate it in network::query

I can probably do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants