AnyBar

OS X 菜单栏状态指示器。「OS X menubar status indicator」

  • 所有者: tonsky/AnyBar
  • 平台:
  • 許可證: Eclipse Public License 1.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

AnyBar: OS X menubar status indicator

AnyBar is a small indicator for your menubar that does one simple thing: it displays a colored dot. What the dot means and when to change it is up to you.

Download

Version 0.2.3:

Or using Homebrew Cask:

brew install --cask anybar

Support us

Usage

AnyBar is controlled via a UDP port (1738 by default). Before any commands can be sent, AnyBar.app must be launched:

open -a AnyBar

Once launched, you may send it a message to change the style of the dot:

echo -n "black" | nc -4u -w0 localhost 1738

If you use bash, you might prefer this instead:

bash -c 'echo -n "black" > /dev/udp/localhost/1738'

The following default commands change the style of the dot:

Command Preview
white
red
orange
yellow
green
cyan
blue
purple
black
question
exclamation
filled
hollow

black and white always has black or white fill. On Big Sur, where text color of menubar might change depending on the wallpaper, you might want to use filled and hollow instead. They are inverted when menubar changes its appearance.

To quit, send quit.

Alternative clients

Bash alias:

$ function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; }

$ anybar red
$ anybar green 1739

Or with /dev/udp:

function anybar { echo -n $1 > /dev/udp/localhost/${2:-1738}; }

Zsh with completion:

Fish shell with completion:

Go:

Node:

Deno:

PHP:

Java:

Python:

Ruby:

Rust:

Nim:

Erlang:

C:

C#:

Crystal:

Emacs:

AppleScript:

tell application "AnyBar" to set image name to "blue"

tell application "AnyBar" to set current to get image name as Unicode text
display notification current

Alfred:

Integrations

Running multiple instances

You can run several instances of AnyBar as long as they listen on different ports. Use the ANYBAR_PORT environment variable to change the port and open -na to run several instances:

ANYBAR_PORT=1738 open -na AnyBar
ANYBAR_PORT=1739 open -na AnyBar
ANYBAR_PORT=1740 open -na AnyBar

Environment variables to specify a title and the initial color of the dot

A title can be set to distinguish dots in the menubar:

ANYBAR_PORT=1738 ANYBAR_TITLE=First  open -na AnyBar
ANYBAR_PORT=1739 ANYBAR_TITLE=Second open -na AnyBar
ANYBAR_PORT=1740 ANYBAR_TITLE=Third  open -na AnyBar

And the initial color of the dot can also be set:

ANYBAR_INIT=blue open -na AnyBar

Custom images

AnyBar can detect and use local custom images stored in the ~/.AnyBar directory. For example, if you have a ~/.AnyBar/square@2x.png image, send square to port 1738 and it will be displayed. Images should be 19×19 pixels for standard resolution, and 38x38 pixels for retina (@2x).

Ports

License

Copyright © 2015 Nikita Prokopov

Licensed under Eclipse Public License (see LICENSE).

主要指標

概覽
名稱與所有者tonsky/AnyBar
主編程語言Objective-C
編程語言Objective-C (語言數: 3)
平台
許可證Eclipse Public License 1.0
所有者活动
創建於2015-03-02 19:27:52
推送於2024-03-19 13:20:44
最后一次提交2024-03-19 11:41:53
發布數9
最新版本名稱0.2.3 (發布於 )
第一版名稱0.1.0 (發布於 )
用户参与
星數6k
關注者數66
派生數159
提交數99
已啟用問題?
問題數51
打開的問題數17
拉請求數34
打開的拉請求數0
關閉的拉請求數9
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?