?

Log in

No account? Create an account
Ryan's Journal -- Day [entries|friends|calendar]
Ryan

[ userinfo | livejournal userinfo ]
[ calendar | livejournal calendar ]

repos.rb [04 Oct 2009|01:36pm]
The RubyCocoa project makes Ruby an incredibly powerful scripting language in Mac OS X.

As an example, here's a script that I used to rearrange windows when switching between various monitors. Based on the width of the main screen (something which I couldn't find a robust way to query outside of the NSScreen Cocoa API), it applies my preferred size and positioning to specific windows I care about. If you run it with '-q', it instead dumps a structure with those windows' current sizes and positions, for feeding back into the script as configuration.

Enjoy:

Source code follows …Collapse )
2 comments|post comment

navigation
[ viewing | October 4th, 2009 ]
[ go | previous day|next day ]