Blog :: Joseph Javier Perla

Switch windows quickly

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 .

508 days ago on September 18, 2008 at 8:19 am and written by Joseph Perla in hacks, technology


To write a comment, just email me

Comments

Newest

Oldest

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.

495 days ago on October 1, 2008 at 11:22 pm and written by Mike


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.

504 days ago on September 23, 2008 at 4:06 am and written by Joseph Perla


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

504 days ago on September 23, 2008 at 1:23 am and written by Mike


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

504 days ago on September 23, 2008 at 1:23 am and written by Mike


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.

504 days ago on September 23, 2008 at 4:06 am and written by Joseph Perla


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.

495 days ago on October 1, 2008 at 11:22 pm and written by Mike


Books
E-mail
My Amazon Wishlist

Favorite Posts

YCombinator Application Guide
Telecommunications
Font Comic: Attempt #1
Returns year 2
Why Plant Rights?

Popular Posts

Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
Capturing frames from a webcam on Linux
How to Ace an IQ Test
A Clean Python Shell Script
Learn 100 digits of pi at lightning speed
BankOfAmerica.com > Mint.com

Recent Posts

Apple's amazing customer support system
Poem #0
Hot Stock Tip #0
Labmeeting rocks
Log Reader 3000
A Clean Python Shell Script

Recent Comments

Andres Garcia: <p>Hi, im looking for “capturing images using Python under windows”, where can i fi...


Andres Garcia: <p>Hi, im looking for “capturing images using Python under windows”, where can i fi...


Andres Garcia: <p>Hi, im looking for “capturing images using Python under windows”, where can i fi...


Andres Garcia: <p>Hi, im looking for “capturing images using Python under windows”, where can i fi...


Andres Garcia: <p>Hi, im looking for “capturing images using Python under windows”, where can i fi...


Andres Garcia: <p>Hi, im looking for “capturing images using Python under windows”, where can i fi...


Categories

Follow

More...