Three displays: two stacked, two mirrored

At the moment my display setup consists of two 24″ monitors stacked vertically. Today I had a visitor and wanted to show stuff across my office desk and found the following gem regarding multiple display setups (from the Display Settings Help):

If more than two displays are connected to your Mac, you can specify that some are mirrored displays and others show the extended desktop. For example, if you have three displays, you can have two displays showing the same information and the third display showing the extended desktop.

  1. Set up all the displays as an extended desktop.
  2. Option-drag a display icon onto another display icon to mirror those two displays.

So now I could continue with my regular setup, but flip open the lid of my Macbook and use it show stuff to my visitor!

Three displays, two stacked, two mirrored
Three displays: two stacked external displays with the lower external display mirrored to the built in display of my Macbook 15″

Use to interactively choose which app to use to open any file

I have been using Choosy for a very long time (a quick search through my email revealed that I started using the beta in 2008 and bought my license in 2009).

Today I discovered a way of using Choosy to pop up a selector for any file type.

Select between opening a PDF file in or

Some time ago I added a rule to Choosy that gave me the option to edit a local .html file using Sublime Text in addition to selecting a web browser to open it in.

Rule for adding Sublime Text to browser selection when opening a local HTML file

Here is how to do it:

  1. Create an alias of ~/Library/PreferencePanes/Choosy.prefPane/Contents/Resources/ (if you have installed Choosy all users remove the initial ~) and put it in your Applications folder.
  2. Create a rule in Choosy in the advanced tab
  3. Set the rule trigger to require that all the following conditions are true:
    • Web address begins with file://
    • Web address ends with <file extension> (replace <file extension> with the file extension of your choosing, e.g. pdf).
  4. Set the action to be “Promt to select from these browsers…”
  5. Select the applications you want to be able to choose from (they need not be browsers).
  6. In Finder right click a file that has the extension you just created a rule for, choose Get Info and change the Open with application to the alias you added to your Applications folder.
  7. Click “Change All...” so that all files with that extension are affected.

Thats it! Now when you click a file with that extension, it will open in Choosy, which in turn will show you the app selection popup. Below is a screenshot of my PDF rule:

Rule for opening a PDF file in or

A fresh Yosemite installation

I just did my first fresh install of Mac OS X (Yosemite) in years and am writing this as a note to self + some possible help for people running in to the same problems as I have. sync

Will not install since it wants to put stuff in /Library/PrivilegedHelperTools/, but can’t create that dir if i does not exist. So you have to create it.

Keyboard Maestro, Jitouch and others

In Yosemite, applications bundled inside an application or preference pane can’t add themselves to the Accessibility list in the Privacy preferences. To add them, you must browse to the bundled app, then unlock the Privacy preference pane, and then drag the app into the list.

LaunchBar 6

Settings etc. can be found in ~/Library/Preferences/at.obdev.LaunchBar.plistand in ~/Library/Application Support/LaunchBar. Just need to copy these.

Keyboard Maestro

Keyboard Maestro can sync macros via Dropbox. Just need to enable it in the app.

MailTags / Mail Act-On

These apps can also sync their settings via a folder synced using e.g. Dropbox.

iTerm 2

Color schemes can be exported.


Expansions (Sets) can be synced via Dropbox. Just go to preferences and change the location of the sets to a new folder in Dropbox and Typinator will ask if you want to copy the existing ones to that folder. Then you just use that folder on the other computer.


Rules can be exported.

Unzip and flatten multiple zip-files on a Mac (bash)

Here’s just a quick note to my future self (other people are free to take part of it too though).

When using the * character to unzip several files using the unzip command on a Mac, the * has to be escaped as unzip wants to do its file listing by itself, rather than having bash do it for it.

So instead of writing unzip *.zip, you would write \*.zip.

Also as a final note to self, to unzip several zip-files into e.g. the parent directory and also ignore any directory structure contained by the zip file + overwriting any duplicate files, one would write

unzip -o -j -d ../ \*.zip

Better Display in Service

Here is a better version of the Display in service which does not need any customization. This version which uses a shell script in Automator rather than an Automator action + AppleScript was originally written by Brett Terpstra, creator of

Posterous seems to have problems with my attached zip-file, so I have hosted it off site: →

Display selected text in Marked

A side effect of posting the previous post was that I wrote a OS X Service that takes the selected text, saves it as a temporary file and opens that temporary file in Marked.

I have attached the Service. Just put it in ~/Library/Services
Download this file

Update 2011-09-05: There is a new version available which you do not have to customize here.

Detect displays via command line

When I get to work, I connect my Macbook to a second monitor. However, in my case, if the monitor is not switched on, the Macbook cannot detect its ID (which lets it load the last set resolution, desktop background and physical arrangement). What I would have to do is to open the Display preference pane and click “Detect displays” which is quite annoying. Today I found a command line tool (which does the same thing), so now I just have to shift-cmd-enter to bring up my DTerm and type detectdisplays.