Joseph Javier Perla

The site design looks much more balanced when this sentence is long

Switch windows quickly

3 comments

I want to avoid RSI.  So, I want to use the mouse as little as I possibly can while I focus on my keyboard.  Unfortunately, alt+tabbing between windows takes far too long and annoys me with how much I have to think to move between the windows.

I often have several windows open.  I want to switch between them very quickly.  So, I created a program using Python and Xlib that generates another program.

The program moves my mouse automatically to a specific location and then clicks automatically.

The program also creates a keyboard shortcut in Gnome.  So, I can type something like Alt+q which calls the program above, moves the mouse to a specific location, and then clicks.

Finally, the program also generates a program which, when called, opens up many windows at specific locations in a grid:

If I combine all of these programs, I can focus between windows very easily. I can move the mouse between 12 spots in a 4×3 grid using the keyboard letters Q,W,E,R, etc like below:

To move to the Top-Left window, I hit Alt+q, which moves my mouse to the top left and clicks, focusing the top-left window.  To move to the bottom right, I press Alt+v, then the mouse moves to the bottom right and clicks, focusing into the bottom right window.

Basically, when I’m programming, I never have to move to my mouse to switch between windows very quickly.  I can open up 12 files at once, and switch between them swiftly and deftly.  When you work on a large application, this becomes very useful.

I’ve open-sourced the program here: http://github.com/jperla/mouse-focus-shortcuts/tree/master .

[?]

Written by Joseph Perla

September 18th, 2008 at 8:19 am

Posted in Hacks, Technology

3 Responses to 'Switch windows quickly'

Subscribe to comments with RSS

  1. why not use ratpoison or xmonad or some other keyboard based wm?

    Mike

    23 Sep 08 at 1:23 am

  2. Xmonad looks awesome. I’m definitely going to try it out this weekend. Thanks Mike!

    One reason that I may stick with Gnome is that I find that packages which a large number of people use tend to be stable, featureful, and constantly improving.

    But Xmonad looks actively developed, so I’ll try it out.

    Joseph Perla

    23 Sep 08 at 4:06 am

  3. yeah let me know what you think. i haven’t really given it a shot yet but i used ratpoison for a while and found it to my liking. certainly less featureful than Gnome, but the much smaller codebase could mean more stability. and it also means it’s easier for you to make changes if you want.

    Mike

    1 Oct 08 at 11:22 pm

Leave a Reply