Create button that changes icon based on network connectivity

I was recently fiddling with some buttons and came across a command that intrigued me - "SET".

I have been using a "Three-button" style button for an activate/deactivate my ethernet port. I would really like to make it so that the button uses the "network_on" icon and "network_off" icon to reflect the status of my current network connectivity. The current button coding I have now is as follows:

Enable Ethernet:

@admin
@runmode:hide
netsh interface set interface "Ethernet" admin=enable

Disable Ethernet:

@admin
@runmode:hide
netsh interface set interface "Ethernet" admin=disable

What would I add to each so that the parent icon of the "three-button" button for this reflects the network's current status? Thanks for your help once again!

There isn't a good way to do that for network state, that I know of.

(I can think of some bad ways, but they'd be complicated to set up and probably unreliable, so I don't think it's worth it.)