dylanaraps / eiwd

iwd without dbus
GNU Lesser General Public License v2.1
47 stars 3 forks source link

Non-dbus client idea #8

Open subnut opened 3 years ago

subnut commented 3 years ago

Why don't we use a unix socket?

I don't know what messages iwmon sends to iwd. But could we send those messages over a socket?

Say, iwd creates a socket at /tmp/iwd-sock and polls it periodically for messages. And when we run some iwmon commands, it sends the messages to that socket. (This is the way bspc talks to the bspwm window manager, IIRC)

Or, if we wouldn't want to poll, then we could simply catch the SIGUSR1 signal to make iwd poll on the socket. But in that case, we would need to implement a PID file for getting the process id to send the signal to. (I think this is more messier approach. I prefer polling.)

🤷

dylanaraps commented 3 years ago

Yes. Just never got around to it since I don't need the client functionality.