So actually I decided to go (what I hope to be) a much more simple route. I 
am going to copy the Net widget functionality and re write it to merely 
show interface state.  When the user adds the widget but gives no interface 
then the widget will show all connected interface states. If up then color 
of iface name would be green. if down then red. 

If the user gives a list of ifaces then in addition to red and green there 
would be a third color signifying that interface does not exist. This would 
be great for transient interfaces such that of vpn connections.

If I get this done I'll then look into adding it to the main list of 
widgets.


On Friday, December 27, 2019 at 12:55:56 PM UTC-5, J A wrote:
>
> Sorry to spam the list. Still working my head around qtile development. 
>
> I would like to use the NET widget to show IP address on my title bar. But 
> instead of using something as mundane as eth0 I'd like to have it 
> dynamically added for the tun0 interface so that when I connect It appears 
> and when I disconnect it disappears. 
>
> I've done this in python before with a library but not sure where to plug 
> this into the qtile framework. I suppose that I could have an external 
> custom vpn connect and disconnect command that calls into qtile to make the 
> necessary changes. But I'd love it to be a bit more dynamic and passive. 
>
> So, I was thinking of mimicking the background changer with feh that I 
> have where I start up a new thread that polls every 5 minutes. If i did it 
> this way I could do a search for the tun0 interface once a minute and if 
> it's there add widget and if it isn't remove the widget. 
>
> If anyone can point me to relevant examples or documentation that would be 
> great. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/20dee494-51af-4e7f-985b-96e54e70818b%40googlegroups.com.

Reply via email to