I'm looking for a script that will swap windows and refresh a browser of your choice. A user should be able to define which text editor and which browser they are using. Running this script via hotkey would be preferred.
If the editor is active, the hotkey sends CTRL-S to the that window. It then activates the browser window and sends Ctrl-F5 to it.
If the second window is active, the hotkey activates the editor.
If any other window is active, you will switch to the editor.
Is this even possible using a bash script?