23
Jul
08
Tagged Under: , ,
Automatically Change Your Dock Design

Hey

This tip was submitted by Sam. If you have any tips you want to share please contact me and I would be happy to talk to you. This tip is designed to automatically change your dock design every so often, automatically. I have posted before about changing your dock design. This post is designed so your dock will change automatically.

First download a couple of dock designs from your favourite dock design site. I like Leopard Docks. Open up /System/Library/CoreServices/Dock.app/Contents/Resources/ in Finder and copy in your dock designs naming them dock1.png dock2.png etc. At this time backup scurve-m.png. This script will replace the scurve-m.png file with your dock design. Its a good idea to have this file backed up.

Open up Terminal and type the following.

cd /System/Library/CoreServices/Dock.app/Contents/Resources/

That will but you inside the dock application. We are going to create a small bash script to automatically change the dock. For easy of use and size we are going to place it in this folder. In Terminal type.

sudo nano dockchanger

You will have to enter you admin password since we are playing with a system protected directory. In nano copy and paste or type the following.

#!/bin/sh
while [ "forever" ]
do
sudo  cp -r dock1.png scurve-m.png
killall Dock
sleep 15
sudo  cp -r dock2.png scurve-m.png
killall Dock
sleep 15
sudo  cp -r dock3.png scurve-m.png
killall Dock
sleep 15
sudo cp -r dock4.png scurve-m.png
killall Dock
sleep 15
sudo cp -r dock5.png scurve-m.png
killall Dock
sleep 15
done

This will replace the scurve-m.png file with your dock design file every 15 seconds (I think). You can change the time to suit. This will then kill the dock so you can see the new design. Save the file by pressing Control + C and giving it a name.

In Terminal again type:

sh dockchange

You have to make sure that you are in you dock folder from earlier. If everything worked your dock should then start to get replaced. To end the script press Control + C in Terminal.

There are some cavets with this script. You have to be in the dock folder to run it and you have to have Terminal open and type the long command for it to run. In a future post I am going to take this a bit further and combine it with cron.

If you want to get your old dock dock. Use your scurve-m.png file and copy it back into place.

If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed. To find out more about RSS check out the help page form more information.

Save/Promote This Post

If you enjoyed reading this article, post you vote. Each vote is highly appreciated. Find out more about bookmarking here

One Response


  1. 1

    if you could post a screenshot of your Dock how it looked like..

    Comment By MacPhobia on July 30th, at 9:11 am

Trackbacks/Pingbacks (Trackback URL)

Please use the Trackback URL above to get properly credited

Respond

Name (required)

Mail (will not be published) (required)

Website

Comments Guidelines

  • Only basic HTML tags are allowed:
  • <a href> <h1 - h6> <acronym> <code> <em> <strike> <strong> <i> <b>
  • Spam comments will be deleted and IP's and websites blacklisted.
  • Remember the rules are here to make sure every one has a good time.
  • If you want more information visit the Comment Guidelines & Help page.

Live Comment Preview:

1,843 Spam comments caught. So why bother spamming?

Small RSS Icon