Netapplet hacking

I found a nice applet by Robert Love that lets one handle his network connections conveniently. It has the inconvenient of working only with Suse, and requires a daemon to run.
Since a while, I use a little sudo’ed bash script named gnet to make all this switching between eth0 and wlan0 and all these APs less painful, so that I don’t have to type in commands every time I change network. This script uses a few config files and zenity, mainly, to handle user input, then it runs iwconfig and ifconfig to update the network. Here are a few screenshots of it:
Choosing interface
choosing interface,

Network configuration
network configuration,

and AP.

You can either run gnet without parameters and set the whole stuff at once, or fix some parameters and get only the necessary screens.

So I spent a few hours hacking netapplet to remove all of its suse & netdaemon bits, and make it interface with my script. The script being sudo-ed with no password (Yes, I know), modifications can be done in one or two clicks.
As this works fine for me, I put the whole stuff up online here, in case it could help someone. Be warned, this is tailored to my needs and network usage habits, so there’s no guarantee that it’ll work for you. ./ should do everything for you, you’ll just have to run netapplet and make the first configuration. Choose the interface from there, the AP if necessary, and « configure network settings ». It’ll initialise the gnet config files so that it knows about your network.