|
Project Information
Links
|
This project hosts Sandip Chitale's Mac OS X scripts and tools. Mac Win Man - MWM for short - a unified Mac OS X Desktop Window and Application ManagerWorks on Mac OSX Lion alsoFeatures
NOTE: The MWM tool requires that the System preferences > Universal access > Seeing > Enable access for assistive devices is checked. Basically this tool combines the functionality of AWS and Move Resize tools below. The biggest improvement is that the combined tool uses the same server running in the background which provides a very fast response. There have been several minor bug fixes and enhancements also. And there is a new package based installer. ScreenshotsSwitcher
TIP Type e to bring up Exposé. This works if you have default key shortcut of F9 to bring up Application Windows navigation of Exposé. TIP Type F1 or ? to show the legend of available commands. Move Resize
TIP Type ? to show the following help window.
Logo
ScreencastSlightly out of date DownloadInstallationAfter downloading the MWM Package double click to install it. Also make sure to add the /Applications/MWMServer.app to your login items to make sure it starts up when you log in. How Switcher works?The implementation uses Applescript to get the list of non background-only applications and their windows. It sends the list of applications and windows to a Java server which displays it in a JTable. When the user types the ENTER key or SPACE BAR the index of selected row is sent back to the Applescript over the STDOUT which activated the selected application and optionally brings the selected window forward un-minimizing it if required. Other commands are sent back in similar fashion. How Move Resize works?The implementation uses Applescript to get the frontmost window and its bounds. It sends the bounds rectangle to a server implemented in Java over a socket connection. The Java server takes the screen shot of the full Desktop and uses it as the Image label (a JLabel with ImageIcon) as the content pane of an undecorated JFrame which has the same bounds as the Desktop. A JPanel with semitransparent background and a dark rounded rectangular border is given the same bounds that were received over the socket. This JPanel is added to the PALETTE_LAYER of the JFrame's layered pane - which makes it appear floating in front of the front window. A Mouse and a Key listener added to the JPanel allow moving and resizing of the JPanel. When the user types the ENTER key the JFrame is hidden and the new bounds of the JPanel are sent back to the Applescript over the socket connection which moves and resizes the frontmost window. TIP I use the Fastscripts Lite to associate keyboard shortcuts with the /Library/Scripts/Switcher.scptd and /Library/Scripts/MoveResize.scpt scripts. TIP You can invoke the scripts using the Scripts menu in the menubar. If you do not have the scripts menu showing in the menu bar you can double click on the file /System/Library/CoreServices/Menu Extras/Script Menu.menu in Finder or execute open "/System/Library/CoreServices/Menu Extras/Script Menu.menu" in a terminal window. Finder and Terminal Integration scripts
Add the following bash functions to your ~/.bashrc file:
# Change the directory of front window of
# Finder to pwd of shell
fcd() {
cd "${1:-.}"
osascript ~/scripts/finder/findercd.scpt "`pwd`" ${2}
}
# Change the directory of front window of
# Finder to pwd of shell and activate the
# Finder window
fcda() {
fcd "${1:-.}" true
}
Screenshot
ScreencastDownload Finder and Terminal Integration scriptsExtract the following zip in ~/scripts folder: AWS - a unified A pplication and W indow S witcher i.e. Command TAB alternativeObsolete See MWM Screenshot
My other pet peeve with Mac OS X is how it deals differently with Applications and Windows that are minimized or hidden when one navigates using Command TAB( For me it does not matter if it is a window or application...I want to be able to switch to various windows where I want to work - hidden, minimized or what ever. Using Command TAB ( Once again, I was aggravated enough to make me write a tool to address just those issue. I wrote the AWS tool. Just download the AWS.zip, extract and drop the script bundle AWS.scptd in ~/Library/Scripts folder. You can either invoke the script from Scripts menulet in the Menubar or by adding a keybinding using QuickSilver or FastScripts. NOTE: The AWS tool requires that the System preferences > Universal access > Seeing > Enable access for assistive devices is checked. TIP If you do not have the scripts menu showing in the menu bar you can double click on the file /System/Library/CoreServices/Menu Extras/Script Menu.menu in Finder or execute open "/System/Library/CoreServices/Menu Extras/Script Menu.menu" in a terminal window. TIP I use the Fastscripts Lite to associate a keyboard shortcut with AWS.scptd. It works great! DownloadWhat's new?
TODO
How it works?The implementation uses Applescript to get the list of non background-only applications and their windows. It sends the list of applications and windows to a Java program which displays it in a JTable. When the user types the ENTER key or SPACE BAR the index of selected row is sent back to the Applescript over the STDOUT which activated the selected application and optionally brings the selected window forward un-minimizing it required. Move and resize windows on Mac OS XObsolete See MWM
I have been always extremely annoyed by the fact that one cannot resize the windows on Mac OS X using all four edges of the window. In fact that is one of the most aggravating thing for me about using a Mac. Another issue is that one cannot use the keyboard to move and resize the windows. I was aggravated enough to make me write a tool to address just those issue. I wrote the MoveResize tool. NOTE: The Move Resize tool requires that the System preferences > Universal access > Seeing > Enable access for assistive devices is checked. What's new?
How it works?The implementation uses Applescript to get the frontmost window and its bounds. It sends the bounds rectangle to a server implemented in Java over a socket connection. The Java server takes the screen shot of the full Desktop and uses it as the Image label (a JLabel with ImageIcon) as the content pane of an undecorated JFrame which has the same bounds as the Desktop. A JPanel with semitransparent background and a dark rounded rectangular border is given the same bounds that were received over the socket. This JPanel is added to the PALETTE_LAYER of the JFrame's layered pane - which makes it appear floating in front of the front window. A Mouse and a Key listener added to the JPanel allow moving and resizing of the JPanel. When the user types the ENTER key the JFrame is hidden and the new bounds of the JPanel are sent back to the Applescript over the socket connection which moves and resizes the frontmost window. Screenshot
ScreencastWatch Screencast This one is for the older version. Download
Quick Start
TIP I use the Fastscripts Lite to associate a keyboard shortcut with MoveResize.scpt. It works great! TIP YOu can execute the scritp from the Scripts menulet in the menu bar. If you do not have the scripts menu showing in the menu bar you can double click on the file /System/Library/CoreServices/Menu Extras/Script Menu.menu in Finder or execute open "/System/Library/CoreServices/Menu Extras/Script Menu.menu" in a terminal window. Keyboard Shortcuts
HistoryI had implemented the original version using SWT. However, it turns out that it is implementable in Swing also - once again proving that Swing is a very good toolkit. Added advantage is that Swing is part of the JDK making the implementation much much smaller. BTW the Swing implementation is much faster and plays nicely with log off and shutdown. |

TAB)/Command Shift Tab (
TAB).
TAB) as a key binding for AWS using FastScripts. However the current mechanism does not allow subsequent use of Option+TAB (
) key to use delta value of 1 pixel. Hold down shift (