change the Dock position

dock position
One of Yosemite’s minor irritations is the removal of the Dock position menu item from the Apple menu.

Now we’re supposed to go hunting around on the Dock for the tiny Dock item separator and control-click it to get the menu, or open up System Preferences > Dock. All too fiddly for my taste.

The following script will rotate the Dock position through left, bottom and right. Just copy the code below and paste straight into a Script Editor document. Hit the Run button to see it in action. Then, save the script to your ~/Library/Scripts folder. Use FastScripts or set up a Service with Automator (example here) to create a hotkey.

Now you can change the Dock position with ease.🙂

tell application "System Events"
 tell dock preferences
   set x to screen edge
   if x is left then
    set properties to {screen edge:bottom}
   else if x is bottom then
    set properties to {screen edge:right}
    set properties to {screen edge: left}
   end if
  end tell
end tell

About philastokes

Freelance Writer, Developer and Technical Communicator. Explaining the unexplainable with images, video and text. Scripting anything imaginable in Applescript, Bash, C, Objective C, Cocoa, Python and Xcode.

Posted on October 27, 2014, in AppleScript, Scripts, Yosemite and tagged . Bookmark the permalink. Comments Off on change the Dock position.

Comments are closed.

%d bloggers like this: