Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have two different accounts right now - one for work, one for play. It helps me stay focused, and it's quite useful.

However, sometimes I don't really love switching back and forth between user accounts sometimes. Thus, I've thought up an idea: What if I had 2 different Docks that I could switch between with a keyboard shortcut?

Thus, my question: Can I create 2 different Docks with 2 different sets of apps on each of them that I can switch between with a keyboard shortcut?

Example: Dock 1 has Finder, Mail, Safari, iTunes, Chrome, Trash on it; Dock 2 has Finder, Firefox, Trash, Opera, and Dictionary on it. I press Command-Option-0 and it switches to Dock 2. I press it again and it switches to Dock 1.

share|improve this question

2 Answers 2

You could use an Automator service or one of the global-keybaord-trigger apps to run a script that switches between two different Dock preference plist files and then relaunches the Dock.

#!/bin/sh
#you'd have a dock-work.plist and dock-home.plist file 

cd ~/Library/Preferences/

if [ -e dock-is-work.state ] ; then 
    rm dock-is-work.state
    touch dock-is-home.state

    #save changes to existing Dock setup
    cp com.apple.dock.plist com.apple.dock-work.plist

    #copy home setup to main preference location
    cp com.apple.dock-home.plist com.apple.dock.plist
else
    rm dock-is-home.state
    touch dock-is-work.state

    #save changes to existing Dock setup
    cp com.apple.dock.plist com.apple.dock-home.plist

    #copy work setup to main preference location
    cp com.apple.dock-work.plist com.apple.dock.plist
fi

osascript -e "tell application \"Dock\" to quit"

(I haven't done bash if-then-else in awhile, so this might not execute as is.)

share|improve this answer

You can use DockSpaces. (They just switched to a paid app, but you can download it for free here)
Dockspaces allows you to have up to 10 different docks that you can switch back and forth with hotkeys (Command + 1, Command + 2, etc.). I found it to be a really great app and really easy to use.

share|improve this answer
    
I normally don't go for paid solutions, but this one looks interesting & useful. Hmm... –  JavaAndCSharp Apr 2 '12 at 10:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.