A tiny "window manager"

Discussion in 'Mac Programming' started by (marc), Nov 4, 2011.

  1. (marc) macrumors 6502a


    Sep 15, 2010
    the woods
    When I'm reading papers, browsing the web or coding, I oftentimes want to view two windows at the same time next to each other. Windows 7 solves this problem well.

    Today, I had some hours of free time, so I decided to write a minimalist app (called "Snapper") that let's you snap the active window to the left or right half of the screen, or maximize it, using keyboard shortcuts (Ctrl-A to snap it to the left half, Ctrl-S to maximize it, Ctrl-D to snap it to the right half). It still has bugs, but it usually works fine.

    I don't have a blog or anything like that, so I'll just "release" it here. It's not a .doc file, but a .tar.gz file, so rename it. Uncompress it and you'll have the Xcode project so you can study the source code and build the app. For the app to work, you'll have to enable access for assistive devices under System Preferences > Universal Access. If you want the app to open when you log in, you can toggle this in Accounts > Login Items.

    Hopefully somebody will find the app / the source code useful!

    I hope this isn't too off-topic.

    Attached Files:

  2. Partron22, Nov 4, 2011
    Last edited: Nov 4, 2011

    Partron22 macrumors 68020


    Apr 13, 2011
    That works pretty well. It'll probably be useful for some types of work.

    Absent a UI, it needs a 'quit' shortcut. Shouldn't be hard to add, the (Carbon!) InstallApplicationEventHandler code is right there after all.
    Perhaps I'll do that myself, and learn something.

    Then again, double-clicking on the Snapper executable inside the App package opens up a terminal window in which the process runs. Close the window, and the process quits too. -Why bother modding things, when it works fine as is?

Share This Page