meta_package_manager.bitbar package¶
Bitbar plugin for Meta Package Manager (a.k.a. the mpm CLI).
Default update cycle is set to 7 hours so we have a chance to get user’s attention once a day. Higher frequency might ruin the system as all checks are quite resource intensive, and Homebrew might hit GitHub’s API calls quota.
-
meta_package_manager.bitbar.
fix_environment
()[source]¶ Tweak environment variable to find non-default system-wide binaries.
macOS does not put
/usr/local/bin
or/opt/local/bin
in thePATH
for GUI apps. For some package managers this is a problem. Additioanlly Homebrew and Macports are using different pathes. So, to make sure we can always get to the necessary binaries, we overload the path. Current preference order would equate to Homebrew, Macports, then system.
-
meta_package_manager.bitbar.
run
(*args)[source]¶ Run a shell command, return error code, output and error message.
-
meta_package_manager.bitbar.
echo
(message)[source]¶ Print message to the output.
Not unlike
click.echo()
, this method is required to support discrepencies in the way strings are handled in different Python versions and platforms.
-
meta_package_manager.bitbar.
print_error
(message, submenu=u'')[source]¶ Print a formatted error line by line.
A red, fixed-width font is used to preserve traceback and exception layout.
-
meta_package_manager.bitbar.
print_package_items
(packages, submenu=u'')[source]¶ Print a menu entry for each outdated packages available for upgrade.
-
meta_package_manager.bitbar.
print_upgrade_all_item
(manager, submenu=u'')[source]¶ Print the menu entry to upgrade all outdated package of a manager.
Print menu structure using BitBar’s plugin API.