Dual screen : moving the menubar


I have 2 screens, and sometimes I use one, sometimes the other. I made a script to move all offscreen windows to the current screen, but I miss the menu bar.

How can I move the osx menu bar to the second screen with applescript ?


Model: MacMini
Browser: Safari 531.22.7
Operating System: Mac OS X (10.6)

I can’t imagine how its possible; you have to drag it from one to the other in in the pref pane gui, and in ~/Library/Preferences/ByHost/ there is a com.apple.preference.displays.xxxxxxxxx.plist file that doesn’t have which screen the menu is in in clear text.

Well, I have this for you:

set thelist to (list folder ((path to home folder as string) & "Library:Preferences:ByHost:" as string))
repeat with i in thelist
	if i starts with "com.apple.preference.displays." then return (i as string)
end repeat

I wish I’d seen this eariler. You can use the Unix utility fb-rotate to move the menu bar to a different display. Find the utility here:


Using “do shell script…” in conjunction with fb-rotate, should allow your AppleScript to move the menu bar. You can find examples of such scripts at