如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

Is there some piece of information you want to keep track of, constantly? For many Mac users, the menu bar is the place to put things like that, but that means collecting individual applications for things like weather, network status, and more.

您是否需要不断跟踪一些信息? 对于许多Mac用户来说,菜单栏是放置诸如此类的东西的地方,但这意味着收集单个应用程序以获取诸如天气,网络状态等信息。

BitBar is a free program that can show basically anything on your menu bar. It does this using simple command prompt outputs, formatted by the use of user-created plugins. It’s kind of like Geektool, which puts custom widgets on your desktop, but for the menu bar.

BitBar是一个免费程序,基本上可以显示菜单栏上的所有内容。 它使用简单的命令提示符输出(通过使用用户创建的插件格式化)来执行此操作。 有点像Geektool,它将自定义小部件放在桌面上,但用于菜单栏。

在Mac上安装BitBar (Installing BitBar On Your Mac)

To get started head to GetBitBar.com and download the application. It comes in a ZIP file, which you can unarchive by double-clicking on it. You’ll then see the application itself.

要开始使用,请访问GetBitBar.com并下载该应用程序。 它包含在一个ZIP文件中,您可以通过双击该文件来取消存档。 然后,您将看到应用程序本身。

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

Drag this to your Applications folder to install it. When you run the program for the first time, you’ll see a single new menu bar item, called “BitBar.”

将其拖到“应用程序”文件夹中进行安装。 首次运行该程序时,您会看到一个新的菜单栏项目,称为“ BitBar”。

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

We don’t have any plugins right now; time to change that.

我们目前没有任何插件; 是时候改变它了。

安装BitBar插件 (Installing BitBar Plugins)

Click the “Get Plugins” menu item, or click here, to start browsing the collection of user-created plugins for BitBar. The plugins are broken into several different categories, ranging from Finance to Lifestyle to Music. Explore the collection until you find something you like.

单击“获取插件”菜单项,或单击此处,开始浏览用户为BitBar创建的插件的集合。 这些插件分为几个不同的类别,从金融到生活方式再到音乐。 探索馆藏,直到找到自己喜欢的东西。

For example: I found a really simple plugin that lets you know, at a glance, whether or not you have internet access at the moment.

例如:我找到了一个非常简单的插件,可以让您一眼知道当前是否可以访问互联网。

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

To install the plugin, you just need to click the “Add to BitBar” button on the website. You’ll then be prompted:

要安装插件,您只需要单击网站上的“添加到BitBar”按钮即可。 然后将提示您:

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

Click “Install” and you’ll see a new item in your menubar:

点击“安装”,您将在菜单栏中看到一个新项目:

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

This is an extremely simple plugin, but a potentially useful one. And that’s generally the idea.

这是一个非常简单的插件,但可能有用。 这就是通常的想法。

After installing your first plugin you’ll notice that the “BitBar” item in the menu bar is now gone. You can find those menu items back in the “Preferences” sub-menu offered by every plugin.

安装第一个插件后,您会注意到菜单栏中的“ BitBar”项现在消失了。 您可以在每个插件提供的“首选项”子菜单中找到这些菜单项。

一些有用的BitBar插件 (A Few Useful BitBar Plugins)

The real fun with BitBar is exploring all the things you can add. For example, there’s a working Pomodoro timer complete with notifications:

BitBar的真正乐趣在于探索您可以添加的所有内容。 例如,有一个工作正常的Pomodoro计时器,其中包含通知:

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

There’s also a fuzzy clock, which rounds the time off and describes it with words instead of numbers:

还有一个模糊时钟,该时钟将时间舍入并用单词而不是数字来描述它:

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

There are tools that show the currently playing track in iTunes, Vox, and Spotify, or even cmus:

有一些工具可以显示iTunes,Vox和Spotify甚至cmus中当前正在播放的曲目

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

There are a multiple tools that give you the current temperature, some of which can detect your current location:

有多种工具可以为您提供当前温度,其中一些可以检测您的当前位置:

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

Other tools give you currency conversions:

其他工具可为您提供货币换算

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

There are also tools for current CPU temperature, fan speed, and keyboard battery levels. There are multiple tools for checking your email. Bitcoin fans will find a bunch of conversation tools too. I could go on, but there are way too many plugins to mention here. The point is, you can add all sorts of things to your menubar, almost certainly including the exact thing you wish you could.

还有一些用于当前CPU温度风扇速度键盘电池电量的工具。 有多种工具可以检查您的电子邮件。 比特币迷也会发现很多对话工具。 我可以继续,但是这里有太多插件需要提及。 关键是,您可以在菜单栏中添加各种内容,几乎可以肯定地包括了您希望的确切内容。

有关依赖的注释 (A Note on Dependencies)

One of my favorite additions is Habitica, a combination role playing game and to-do list that I use to get things done. BitBar adds your tasks to the menu bar:

我最喜欢的游戏之一是Habitica,这是一种角色扮演游戏和待办事项的组合,可用来完成任务。 BitBar将您的任务添加到菜单栏:

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

But this particular addon has a dependency, which means you need another application installed in order to use it. Dependencies are pointed out on the Plugin’s download page, like this:

但是,这个特定的插件具有依赖关系,这意味着您需要安装另一个应用程序才能使用它。 依赖关系在插件的下载页面上指出,如下所示:

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

This means we need something called node5 installed on our computer in order to use the plugin.

这意味着我们需要在计算机上安装名为node5东西才能使用该插件。

The easiest way to acquire such dependencies is to set up Homebrew to install command line tools on your Mac. Once you have Homebrew set up, generally all you need to do is run brew install from your terminal, followed by the name of any dependencies BitBar requires. In this case, the command is brew install node5.

获取此类依赖关系的最简单方法是设置Homebrew,以便在Mac上安装命令行工具。 设置好Homebrew之后,通常所需要做的就是从终端运行brew install ,然后输入BitBar所需的任何依赖项的名称。 在这种情况下,命令是brew install node5

管理您的BitBar插件 (Managing Your BitBar Plugins)

Perhaps you’ve installed a bunch of BitBar plugins, but only want to keep a few. You can remove plugins by heading to the Plugins folder. The easiest way to find this is by clicking the “Open Plugins Folder” button in the BitBar preferences menu.

也许您已经安装了一堆BitBar插件,但只想保留其中几个。 您可以通过转到Plugins文件夹来删除插件。 最简单的方法是单击BitBar首选项菜单中的“打开插件文件夹”按钮。

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

You will be taken to a folder in the Finder, which contains all of your plugins.

您将被带到Finder中的文件夹,其中包含所有插件。

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

Removing a plugin from BitBar is easy: simply delete the .py file. Alternatively, you can make a sub-folder of plugins you want to keep around but not necessarily run right now.

从BitBar删除插件很容易:只需删除.py文件。 另外,您可以为要保留但不一定立即运行的插件创建子文件夹。

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

Anything in the sub-folder will not run. This makes it easy to manage a bunch of plugins.

子文件夹中的任何内容都将无法运行。 这使得管理一堆插件变得容易。

While we’re looking at the plugins folder, go ahead and open any of the plugins with a text editor. In some cases this will be necessary to use them; if a plugin requires a login or an API key, for example, you’ll need to add the information yourself.

当我们查看plugins文件夹时,请继续并使用文本编辑器打开任何插件。 在某些情况下,有必要使用它们。 例如,如果插件需要登录名或API**,则需要自己添加信息。

如何使用BitBar将几乎所有信息添加到Mac的菜单栏中

The place to put such information is usually clearly marked, as shown above, but if using a text editor scares you BitBar might not be the best choice.

如上所示,放置此类信息的位置通常会被清楚地标记,但是如果使用文本编辑器,恐怕BitBar可能不是最佳选择。

创建自己的BitBar插件 (Creating Your Own BitBar Plugins)

If you’re handy with the command prompt and a little light coding, you can create your own BitBar plugins to show the output of any command. Outlining precisely how to do that is beyond the scope of this article, but there’s a handy collection of tutorial plugins available to anyone who wants to dive in. Take a look at how these plugins work and you’ll learn the tricks you need to make your own plugin. Get started, power users, and let me know if you create anything!

如果您方便使用命令提示符和少量代码,则可以创建自己的BitBar插件以显示任何命令的输出。 精确地概述如何做到这一点不在本文的讨论范围之内,但是有大量想要学习的人可以使用的教程插件集合。看看这些插件如何工作,您将学到制作这些技巧。您自己的插件。 开始使用,请高级用户,如果您创建了任何东西,请告诉我!

翻译自: https://www.howtogeek.com/283104/how-to-add-almost-any-information-to-your-macs-menu-bar-with-bitbar/