[arch-general] Get netctl status from C?

Martti Kühne mysatyre at gmail.com
Sun Dec 15 06:32:56 EST 2013

On Sun, Dec 15, 2013 at 7:01 AM, Daniel Bryan <danbryan at gmail.com> wrote:
> I run dwm with a custom C program to update the status bar.
> So far I can check everything without needing to exec(), e.g. through
> libmpd, parsing /proc/meminfo, and so on.
> Is there a way to interface with the netctl profile system from C? I
> really just want to find the currently actively profile.

I think there isn't explicitly any process running after netctl is
done configuring the network configuration. So you should either get
more specific about the kind of information you want, so whether you
are talking about network state or netctl's opinion about it (not that
these are likely to diverge, but there's my point)...

Uhm... a glance into netctl's source just revealed it's a bash script.
You'll need exec anyway.

I'd be interested in the features you added, have you considered
githubbing your customizations?


More information about the arch-general mailing list