richardgv/skippy-xd — pull request #33 by fazjaxton (2013-12-14 18:33:44+00:00)
Title: Add Toggle and Deactivate Features

I've added command line options to deactivate the window picker once it's running and to toggle the window picker on and off. I really like the toggle feature on my desktop so that if I hit the hotkey a second time it deactivates the window picker. In the original version, pressing the key multiple times queued up multiple commands in the command queue, so when you selected a window it would immediately re-activate the window picker and force you to select again.

To do this cleanly, I had to break skippy_run into multiple functions, which start, manage, and end the window picker. Both the command pipe and the xevents are now handled in the main daemon loop with a single poll call.

There should be no functional changes to the window picker itself. However, in breaking things up I introduced a lot of whitespace changes. I recommend reviewing the first change in the branch with "git diff -b", which will ignore whitespace and make it easier to verify that little has changed about the actual window picker code.

I have added a few (file-level) global variables that are just sitting around between functions. I don't intend to have these in the final version, but before I spend a lot of time cleaning up, I wanted to get your comments.

Let me know if you have questions. Thanks!

P.S. Github seems to want to associate these commits with my old account, even through I've transferred my e-mail address to this account. One of the github help pages says this should eventually clear itself up. Hopefully it will all just look OK to you.