Network scripting, dynamic configuration, wifi

I'm wondering what every uses for dynamic wifi/network configuration.

First up are there any console/gui for selecting a wifi connection from a menu? Optionally typing in the SSID/WPA key? What about auto connecting?

Anything for even more complicated network scripting? Say deactivating wifi when you plug in an ethernet cable and then bring wifi back on when you disconnect?

Can we compound this by somehow detecting where we are connecting to and priorities for networking and doing different complicated routing depending on where we are? For instance script when I go to a particular cafe not just to connect to the wifi but automatically setup an ssh tunnel and auto route over it...
 
Back
Top