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.

Like the OSX menu items for wifi, battery... I would like to be able to have a permanent order of the third-party menu bar items.

I do not want to mix OSX with third-party menubar items, I simply want them to always appear in the same order.

Setting an order for the menu extras to launch in the startup items does not do the trick.

enter image description here

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

Edit:

As it turns out, disabling resume upon login is enough.


With Applescript, this is a nice solution.

set theAppList to {{name:"Growl", vis:false}, {name:"Caffeine", vis:false}, {name:"Boom", vis:false}, {name:"Shimo", vis:false}, {name:"Twitter", vis:false}}
set theDelay to 0.5

repeat with currentApp in theAppList
    tell application (name of currentApp) to launch
    delay theDelay
    tell application "Finder" to set visible of process (name of currentApp) to (vis of currentApp)
end repeat

Important Note

You need to disable resume upon login for this script to work. ("Reopen windows when logging back in").

This can be done permanently with one line in Terminal.

How to implement the script

  1. Open AppleScript Editor.app
  2. Paste Script above and customize to your use.
  3. Save as Application enter image description here
  4. Right-Click on the created application and navigate to .../Contents/Info.plist It will open in Xcode.
  5. Menubar -> Editor -> Add Item
  6. Select: Application is agent (UI Element): YES and save. enter image description here
  7. Add the script to the Login Items in the System Preferences.
  8. Remove all the Apps that are used in the script from the Login Items.
share|improve this answer
1  
It could be easier to save it as a regular script and run it with a launchd agent (see How do I run an Automator action, shell script or AppleScript on startup in OS X? - Super User) –  Lri Jan 3 '12 at 12:02
add comment

In your system preferences if you remove a menu item for whichever program is on there, and then put it back, it will go on the end of the line (left). So you can remove them and then put them all back in the order you want them. Not exactly and elegant solution but it works.

share|improve this answer
    
I've tried this already (see question), but the order for the login items is in no way related to order of the items in the menu bar which is different every time. Also, not all menu items do appear in the login items section. –  gentmatt Dec 30 '11 at 16:13
    
Oh I misread, I didn't realize you meant you wanted it that way on login. I don't know a lot about applescripts but I bet there's a way to automate it using applescript? –  CaldwellYSR Dec 30 '11 at 16:15
add comment

You can hold command while drag and drop it to change the order. I don't know it will remember the order or not though.

share|improve this answer
1  
That only applies for the OSX menu items, not for third-party applications –  gentmatt Dec 30 '11 at 15:03
add comment

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.