I would really like to see a hotkey/keyboard shortcut to be able to quickly connect and disconnect from my VPN. I have to connect and disconnect many times a day and a quick keyboard shortcut would make this much easier. Also, the shortcut should be modifiable by the user.
Comments
You could try AppleScript, though this guide is for Mavericks (I couldn't get it to work with PIA on Lion):
https://apple.stackexchange.com/questions/118078/select-a-menu-item-in-applescript-without-using-system-events-in-10-9-maverick
Disconnecting PIA is a bit tricker. I created a little utility that will gracefully disconnect PIA. You can get it here:
https://www.dropbox.com/s/i12eagfk7t7sasc/PIA Killer.zip?dl=0
Extract the files to a new folder. Then create a Desktop shortcut to Kill_PIA.exe, and assign it a keyboard shortcut using the standard Windows method.
Note: the Zip file contains a second program called "SystemTrayRefresh.exe", which must reside in the same folder. The main .exe uses it to force-clear the "green guy" PIA Tray icon from the notification area.
I started with a very simple 2-line batch file, which I then compiled into a standalone EXE. Here's all it does:
taskkill /f /im rubyw.exe /t
SystemTrayRefresh.exe
If anyone wants to fool around with it, here's another Zip file which also includes the original batch file, icon file, and a link to the Bat2Exe compiler I used:
https://www.dropbox.com/s/xlcbh7m9khg3sam/PIA%20Killer_src.zip?dl=0
Note: If you re-compile, I recommend enabling the "Add administrator manifest" option. Taskkill requires admin privileges.