Get iTunes track notifications in your Dock
In Lion there is a cool hidden setting to enable “Now playing” notifications that appear from the iTunes icon in the Dock. Every time a new song starts, a small popup containing the artist and the song name appears and then slowly fades out after a few seconds.

To enable this, start by opening Terminal (located in Applications/Utilities), then paste in the following line and press Return.
defaults write com.apple.dock itunes-notifications -bool YES
For the changes to take effect, the Dock has to be restarted. The easiest way to do this is to type killall Dock into the Terminal and press Return. If you change your mind and want to disable the notifications, repeat the above commands, but replace YES with NO.
For those of you who have your Dock set to hide when not in use, you’ll notice that when the Dock is hidden the iTunes icon is added to the notification. If you want the icon to show even when the Dock is not hidden, just use the following command in the same way as above:
defaults write com.apple.dock notification-always-show-image -bool YES
As before, remember to restart the Dock with killall Dock for changes to take effect.
It’s not entirely clear why this setting isn’t present in the iTunes preferences. It might still be under development — there is still room for improvement. For example it would be better if it included the album artwork like Bowtie, Growl and DockArt already do. It could also be a sneak peak of future plans Apple has for a notifications framework for all apps in Mac OS X, much like Growl provides at the moment.
Disable restored windows when re-opening specific apps
There’s a great tip over on the Macs in Chemistry blog on how to stop Lion from restoring your previous windows when re-opening specific apps. In System Preferences there’s a checkbox for turning this on and off globally, but using a handy little AppleScript you can disable it on a per-app basis.
One of the new features in Lion is the ability of applications to resume activity at the point an application was quit. This means that when you reopen an application it will open and display all the documents you were editing in the state when you quit the application. This is obviously very useful but there are times when you may not want confidential documents automatically opened and displayed when you open an application.
Here’s an example of the script for Safari:
set statePath to POSIX path of (path to home folder) & "Library/Saved Application State/com.apple.Safari.savedState" set quotedPath to quoted form of statePath try do shell script "test -w " & quotedPath set current to "enabled" on error set current to "disabled" end try if current is "enabled" then tell application "Finder" to delete every item of ((POSIX file statePath) as alias) do shell script "chmod u-w " & quotedPath display dialog "Disabled window restore for Safari" buttons "OK" default button 1 else do shell script "chmod u+w " & quotedPath display dialog "Enabled window restore for Safari" buttons "OK" default button 1 end if
Head over to macinchem.org for a quick explanation of how to add it to your scripts menu to give you an easy place to access it.
Quickly add to do items to iCal's Reminders from anywhere with a keyboard shortcut
Until recently, my favourite task management (to do list) app for Mac and iPhone/iPad has been Things. It has just the right balance of Apple-like simplicity and powerful features that makes managing tasks quick and easy and not yet another task in itself. Unfortunately, the developers, Cultured Code, have been very slow at getting the cloud sync sorted out, meaning you still have to manually sync your tasks between your different devices and on top of this it’s still not even possible to sync tasks between multiple Macs.
With that in mind, I’ve been trying out some alternatives, including Wunderlist, but I’ve finally settled on using Apple’s own solution. With the release of iOS 5, Mac OS X Lion and iCloud, finally iCal Reminders on the Mac and the Reminders app on the iPhone are good enough to rival these third party solutions.
One piece of Things functionality I find myself missing, however, is the Quick Entry window. This allowed you to quickly create a new To Do item using a simple keyboard shortcut that worked in any application. This meant I could be reading an email, press the keyboard shortcut and Things would bring up a new To Do item dialog, autofilled with the details of the current email message.
Fortunately, we can go some way to replicating this functionality using an Automator service. Don’t worry if you’ve never used Automator before, this is a really easy workflow containing only a single “Automator action.” Start by opening Automator (located in the Applications folder), and choose the Service type for your new document.

From the Calendar section of the Library, drag the New To Do Item action over into the workflow area on the right. This is the only action we’ll need! Using the fields and drop-down menus, you can customise the default values that will appear when the Quick Entry window is invoked. Before we save, there are two more things we need to set. Firstly, change the drop-down menus above the workflow to specify that the service receives no input in any application. Secondly, click the Options button at the bottom of the action, and check the box Show this action when the workflow runs. When you’re finished, it should look something like this:

To finish, choose Save from the File menu and give it a name like “New To Do Item.”
The next step is to add the keyboard shortcut so that we can easily bring up the Quick Entry window without having to go to the Services menu. To do this, open up System Preferences and go to the Keyboard section. Under the Keyboard Shortcuts tab, click Services in the list on the left, and scroll down to the bottom of the list on the right to find your new service. To add the keyboard shortcut, double-click on the area to the right of your service and press whatever shortcut you want. I went for Control-Option Space.

Finally, all that’s left is for you to test it out. Open up Safari or Mail or any of your usual applications, and start going about your normal business. Then try pressing your chosen keyboard shortcut, and the Quick Entry window should appear. iCal doesn’t even have to be open.
Bonus Tip: If you’re feeling adventurous, try creating a second service that automatically takes the currently selected text as the title of the to do item by changing the Service receives drop-down menu to text. Check out the screenshot below for some ideas on how to do this.

Browse man pages in Lion's Terminal
Here’s a handy new feature tucked away in the Terminal in Lion. To quickly view the man page for any command, just right-click on it and choose Open man Page from the context menu. A new window will pop up, displaying the manual for that command.

This can save you a little bit of time, especially if you like to open up man pages in a new window alongside whatever you are currently working on. This way, you no longer need to open up a new window and type man <command> every time. It also displays the man pages with a distinctive yellow background, so its easier to distinguish if you have a lot of Terminal windows open.
As with a normal Terminal window, the colour scheme is also customisable. In the Terminal Preferences, just look under the Settings tab and choose the Man Page theme from the list.

The Open man Page menu item is also available from within the yellow man page windows. I find this really useful when I get to the “See Also” sections that are common at the end of many man pages. Instead of having to remember all the related commands and look at their man pages one at a time, I can simply right-click on each and simultaneously open up man pages for all of them.
Finally, there’s another menu item, Search in man Pages. This uses the apropos command to display a list of all the available man pages for commands that contain the keyword you have clicked on. As you’d expect, you can just right-click on any of the search results and choose Open man Page to view the relevant page.
Spread out application windows in Mission Control
One of the differences between Mission Control in Lion and Exposé in previous versions of Mac OS X is that each application’s windows are grouped into a “stack”. This can make it a little bit tricky to see which window is which and click the one you want, especially if it turns out to be the one at the bottom of the stack.
Luckily there’s an easy way to spread out a stack so you can see all the windows more easily. Just position the mouse cursor over the stack, and swipe up with two fingers. Alternatively you can get the same effect using a spread gesture — swipe three fingers and your thumb in an outward motion. If you are using a magic mouse rather than a trackpad, a simple one finger upwards swipe will have the same effect.
To then get an even closer look at a specific window, just position the mouse cursor over it as before, and press the space bar. This will zoom the window up to near full size.
