Bitbar: Ability to sort plugins

Created on 14 Jun 2016  Â·  11Comments  Â·  Source: matryer/bitbar

This might become irrelevant if move/rearrange functionality is available (see #158), but maybe there's a quick and easy way to sort plugins, so they appear in a certain order in the menu bar, whether together as a bunch or (in a later version) separated. I know, it's easy to do by simply renaming the basenames, but sometimes (e.g. with plugin distributions to other users/customers) this is not an option. Therefore my suggestion to add an option (a window) in Preferences, which shows a list of the active plugins, and where the user can just rearrange the order by dragging them up/down the list.

Most helpful comment

So I figured out a workaround to this. If you go to the plugins folder, and prefix the plugin files with a number in the order you want them in reverse order it will follow that order regardless of how many times you refresh or reboot.

For example:

1_ColorfulBatteryLevel.5s.sh
2_wifi.15s.sh
3_itunes.10s.sh
4_sonos.3s.sh

Hope this helps!

All 11 comments

You already have a similar functionality when you install Bartender. But with the Bartender setup you can only move around BitBar plugins en bloc. (Except for the LittleSnitch Monitor, which is strange: you can't move that one _at all_.) Maybe Sierra will be more intelligent, and you'll be able to move every BitBar plugin individually… we'll see. :)

Has anyone tried this in the macOS 10.12 beta?

It seems to work correctly in Sierra. However, a plugin's position seems to reset if its output is empty.

This looks like a duplicate of #158.

+1
Currently I can reposition my plugins, but only temporarily as they reset their position on refresh.

So I figured out a workaround to this. If you go to the plugins folder, and prefix the plugin files with a number in the order you want them in reverse order it will follow that order regardless of how many times you refresh or reboot.

For example:

1_ColorfulBatteryLevel.5s.sh
2_wifi.15s.sh
3_itunes.10s.sh
4_sonos.3s.sh

Hope this helps!

This only works if none of your plugins ever disappear. I have several plugins which don't produce any output at all under certain conditions (e.g. no new <insert website here> notifications, or battery level above 70%), and these will be added to the left end of the bar, instead of the expected position, when they generate output for the first time after starting or refreshing BitBar.

This still doesn't work #sad

The naming trick doesn't even seem to work for me? Can anyone confirm that it still works for them? Otherwise at the very least, wouldn't the plugins be sorted alphabetically by their filenames, if you don't number them? Which in my case, doesn't seem to be what's happening, anyway.

I have Bartender 3 installed, if that matters.

See code change in #502

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alesf picture alesf  Â·  7Comments

BigPrimeNumbers picture BigPrimeNumbers  Â·  4Comments

fenhl picture fenhl  Â·  4Comments

jakeoid picture jakeoid  Â·  3Comments

manojlds picture manojlds  Â·  11Comments