I've created some shortcuts mimicking the Unity's Mod4 + num behavior.
wmctrl -xa Sublime || subl
What I don't like, is that once sublime is running, it always focuses the first opened window. I'd like to focus the last "focused" window. Same as in Unity. Is there a flag for that?
Best Answer
This script does what you want:
EDIT: This script always focuses on the last focused window, as opposed to cycling through the windows in the order they were opened.
EDIT 2: I modified the script (turns out wmctrl and xprop use slightly different formats for displaying hexadecimal numbers).
EDIT 3: app name should be taken from the 3rd column of wmctrl -lx to avoid certain conflicts.