OS X menubar status indicator

Related tags

AnyBar
Overview

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

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

Zsh with completion:

Fish shell with completion:

Go:

Node:

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/[email protected] 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).

Issues
  • Added blink command

    Added blink command

    Pretty self-explanatory.

    • Just echo -n "blink" | nc -4u -w0 localhost 1738, after setting the colour you wanted.
    • Calling it again stops blinking.
    • Changing colour while blinking changes the colour, but continues blinking.
    • Blinks once per second.

    That's all !

    opened by perfaram 9
  • Publish to Homebrew

    Publish to Homebrew

    I would absolutely love to create some plugins for my automated tasks so I don't have to tab to them, any chance you could publish this to Homebrew? https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md#formula-cookbook

    opened by davemackintosh 8
  • Doesn't start on Mavericks

    Doesn't start on Mavericks

    Not sure if this is a Yosemite only tool, but I'm getting the following on Mavericks.

    $ open /Applications/AnyBar.app
    LSOpenURLsWithRole() failed with error -10825 for the file /Applications/AnyBar.app.
    
    opened by amaltson 6
  • Big Sur dynamically switches between black and white icons depending on desktop background

    Big Sur dynamically switches between black and white icons depending on desktop background

    This means that choosing the image style based on whether dark mode is enabled or not is not sufficient to choose the correct image, as the menu bar may be using black icons or white icons regardless. This is a screenshot of my mac with dark mode enabled, but a light desktop background image, and setting anybar to the "black" image:

    image

    My desktop image is a dynamic wallpaper, so in the evening it's much darker and the mac switches to using white icons.

    opened by 6twenty 6
  • Allow the menubar icon to be moved with the command-click shortcut

    Allow the menubar icon to be moved with the command-click shortcut

    Some icons can be rearranged by command+click/drag. Please implement this feature so I can easily keep my menubar organised without having to buy bartender.

    opened by VFS 5
  • Usage in Swift?

    Usage in Swift?

    This is only an issue with my rudimentary Swift skills – sorry if it's inappropriate to post here.

    That said… any suggestions for how to change the icon in Swift? I've explored NSTask with both echo and via an AppleScript. Establishing a connection using BSD sockets seems like massive overkill (and I haven't been successful in any event.)

    opened by skonesam 5
  • Set tooltip

    Set tooltip

    This might be out of scope of this app, but it would be useful to be able to set a tooltip for the menubar app, from a client. This is especially useful when you have multiple instances of AnyBar so you can distinguish them.

    opened by sindresorhus 4
  • When downloaded it did not work

    When downloaded it did not work

    When I downloaded anybar, and tried to set the color, the icon turned clear and would not respond to any color setting. When I used cask to install it worked just fine. screen shot 2015-04-11 at 10 08 07 am

    opened by voronoipotato 4
  • Sample command in documentation does not work with netcat 0.7.1 at OS X El Capitan / 10.11.4

    Sample command in documentation does not work with netcat 0.7.1 at OS X El Capitan / 10.11.4

    I tried to get combination of netcat parameters to send out single command and terminate, but failed. The command sits open till you ^C it. Could you please provide modern working example in documentation?

    $ /bin/bash
    bash-3.2$ echo -n "black" | nc -4u -w0 localhost 1738
    nc: invalid option -- 4
    Try `nc --help' for more information.
    bash-3.2$ echo -n "black" | nc -u -w0 localhost 1738
    Error: Invalid wait-time: 0
    bash-3.2$ echo -n "black" | nc -u -w 1 localhost 1738
    ^C
    

    Which version is being used:

    bash-3.2$ ls -l `which nc`
    /usr/local/bin/nc -> ../Cellar/netcat/0.7.1/bin/nc
    bash-3.2$ brew info netcat
    netcat: stable 0.7.1
    Utility for managing network connections
    http://netcat.sourceforge.net/
    /usr/local/Cellar/netcat/0.7.1 (10 files, 103.3K) *
      Built from source
    From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/netcat.rb
    bash-3.2$
    
    opened by ya-pulser 4
  • Added support for a custom label in the menu

    Added support for a custom label in the menu

    I found it useful to identify what a particular dot was doing using a label in the menu.

    I added some code to add a label to the menu based on the environment variable ANYBAR_LABEL. If this variable is set the text is shown in the menu.

    opened by andrewsjg 4
  • 0.2.3 opening old style dots on 10.15.7

    0.2.3 opening old style dots on 10.15.7

    when I launch it, it uses old dot styles, rarely it uses new, but if I try fill and hollow on them which I wanted it doesn't work and goes back to previous version dots, is this version only for big sur?

    opened by greeneryAO 4
  • Can't open on Mac OS 10.15.7

    Can't open on Mac OS 10.15.7

    Fresh Homebrew reinstall, and I get a Finder dialog: “AnyBar” can’t be opened because Apple cannot check it for malicious software. This software needs to be updated. Contact the developer for more information.

    Homebrew Cask downloaded this file on February 22, 2021 from github.com.

    opened by phubbard 2
  • Feature Request: arbitrary message

    Feature Request: arbitrary message

    It would be nice if we could also send some arbitrary message to Anybar, which would be revealed in the pop-up menu by clicking on the icon. Optionally, there could be a badge on Anybar to indicate that there's a new message to be read.

    opened by huyz 1
  • Flashing Icon Feature Req

    Flashing Icon Feature Req

    First, let me say I'm excited to have found this wonderful little app that is so simple to use and so versatile! I am currently using it warn when I have disabled sleep mode on my MBP, however, I would like it to be even more obvious than the exclamation sitting motionless in the bar...

    It would be awesome if there was a flash parameter... just a simple blink on and off at 1-second intervals. Even better if there was a way to customize the flashing interval, etc.

    I would try to submit a pull for this feature but that type of coding is above my helmet. For now, I'm going to try and hack the feature by having a Keyboard Maestro macro that uses the nc calls to flash it on and off.

    Thanks for listening! Keep up the great work!

    opened by someinternetguy 2
  • emoji

    emoji

    Can I place emoji (Unicode symbol) to menubar?

    opened by netneladno 1
  • Support XDG Base Directory Specification for custom image folder

    Support XDG Base Directory Specification for custom image folder

    The XDG Base Directory Specification provides a bunch of folders for collating config files, and mechanisms to override the default (~/.config), so our home folders don't end up stuffed with dot files.

    It would be great if AnyBar could support .config/AnyBar in addition to .AnyBar.

    opened by jaketmp 1
  • [Security] Path Traversal

    [Security] Path Traversal

    mv secret_icon.png ~/secret_icon.png
    echo -n "../secret_icon" | nc -u localhost 1738
    

    What should happen: A question mark icon is displayed as no valid icon was found in ~/.AnyBar

    What happens: The secret icon is displayed which is located at ~/.AnyBar/../secret_icon.png

    I can't think of a way to exploit it however.

    opened by fuzzyroddis 2
  • nc: invalid option -- 4

    nc: invalid option -- 4

    Hi, I couldn't run the nc command as expected. It seems I have a different version of netcat. I am using macOS Sierra 10.12.5

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

    nc: invalid option -- 4
    Try `nc --help' for more information.
    

    $ nc --version

    netcat (The GNU Netcat) 0.7.1
    Copyright (C) 2002 - 2003  Giovanni Giacobbi
    
    This program comes with NO WARRANTY, to the extent permitted by law.
    You may redistribute copies of this program under the terms of
    the GNU General Public License.
    For more information about these matters, see the file named COPYING.
    
    Original idea and design by Avian Research <[email protected]>,
    Written by Giovanni Giacobbi <[email protected]>.
    

    $ nc --help

    GNU netcat 0.7.1, a rewrite of the famous networking tool.
    Basic usages:
    connect to somewhere:  nc [options] hostname port [port] ...
    listen for inbound:    nc -l -p port [options] [hostname] [port] ...
    tunnel to somewhere:   nc -L hostname:port -p port [options]
    
    Mandatory arguments to long options are mandatory for short options too.
    Options:
      -c, --close                close connection on EOF from stdin
      -e, --exec=PROGRAM         program to exec after connect
      -g, --gateway=LIST         source-routing hop point[s], up to 8
      -G, --pointer=NUM          source-routing pointer: 4, 8, 12, ...
      -h, --help                 display this help and exit
      -i, --interval=SECS        delay interval for lines sent, ports scanned
      -l, --listen               listen mode, for inbound connects
      -L, --tunnel=ADDRESS:PORT  forward local port to remote address
      -n, --dont-resolve         numeric-only IP addresses, no DNS
      -o, --output=FILE          output hexdump traffic to FILE (implies -x)
      -p, --local-port=NUM       local port number
      -r, --randomize            randomize local and remote ports
      -s, --source=ADDRESS       local source address (ip or hostname)
      -t, --tcp                  TCP mode (default)
      -T, --telnet               answer using TELNET negotiation
      -u, --udp                  UDP mode
      -v, --verbose              verbose (use twice to be more verbose)
      -V, --version              output version information and exit
      -x, --hexdump              hexdump incoming and outgoing traffic
      -w, --wait=SECS            timeout for connects and final net reads
      -z, --zero                 zero-I/O mode (used for scanning)
    
    Remote port number can also be specified as range.  Example: '1-1024'
    
    opened by kehao95 3
  • Icons support

    Icons support

    I've created a fork which adds support for any icons from icons8.com. Just pass a icon id and the icon will be used for the menu item.

    Not sure whether you want this functionality in AnyBar or want to stick to the colored dots? Should I fine tune my fork and create a pull request?

    Fork repo at https://github.com/niklasberglund/AnyBar-icons

    opened by niklasberglund 0
  • How do I specify udp port with applescript?

    How do I specify udp port with applescript?

    i know in shell i can do echo -n black | nc -4u -w0 localhost <port number> but i cant figure out how to accomplish this in applescript (besides using do shell script "command")

    http://imgur.com/a/tlRXc

    this would suggest its possible to set the udp port but i cant figure out the syntax.

    opened by moshed 4
Releases(0.2.3)
Owner
Nikita Prokopov
Nikita Prokopov
Bitwarden in the macOS menu bar

Bitwarden Menu This project is not associated with the Bitwarden project nor 8bit Solutions LLC. Bitwarden Menu is a simple application for macOS that

Jonas Drotleff 32 Sep 20, 2021
Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)

Welcome to xbar xbar (the BitBar reboot) lets you put the output from any script/program in your macOS menu bar. Complete rewrite from the ground up -

Mat Ryer 15.4k Sep 23, 2021
Add a global delay to Command-Q to stop accidental app quits.

Slow Quit Apps A macOS app that adds a global delay of 1 second to the Cmd-Q shortcut. In other words, you have to hold down Cmd-Q for 1 second before

Douglas Teoh 980 Sep 18, 2021
Simple network activity monitor for macOS

Loading See when Mac apps are using your network Similar to the network activity indicator on iOS, Loading shows a spinning progress wheel in your men

Mike McFadden 564 Sep 14, 2021
Control the listening mode on your AirPods Pro in the Touch Bar or Menu Bar.

NoiseBuddy Change noise cancelling settings on your AirPods Pro or Beats Solo Pro directly from your Mac's Menu Bar or Touch Bar. I wanted an easier w

Guilherme Rambo 622 Sep 22, 2021
:cat2: webrtc screensharing electron app for mac os (Alpha)

ScreenCat ScreenCat is an open source screen sharing + remote collaboration application. You can share your desktop with someone else while letting th

Max Ogden 3k Sep 16, 2021
Replacement for MacOS' volume, brightness and keyboard backlight HUDs.

SlimHUD Replacement for MacOS' HUDs. Every day you change your volume or brightness and an ugly and unbelievably old overlay animation appears. SlimHU

Alex Perathoner 133 Sep 13, 2021
Mac Media Keys for the Masses

Common Issues It's asked that anyone with an issue check the Wiki Section before posting a new issue. Users Guide What? BeardedSpice allows you to con

null 2.7k Sep 19, 2021
Your next meeting always before your eyes in the macOS menu bar

MeetingBar is a menu bar app for your calendar meetings (macOS 10.15+). Integrated with 20+ meeting services so you can quickly join meetings from eve

Andrii Leitsius 2.4k Sep 22, 2021
The missing Desktop application for Pushbullet.

PB for Desktop PB for Desktop is a lightweight open-source Desktop app for PushBullet. Receive native push notifications on macOS, Windows and Linux.

sidneys.github.io 466 Sep 11, 2021
PowerShell for every system!

PowerShell Welcome to the PowerShell GitHub Community! PowerShell Core is a cross-platform (Windows, Linux, and macOS) automation and configuration to

PowerShell Team 29.6k Sep 18, 2021
Adds numbered shortcuts to the output git status, and much more

SCM Breeze Streamline your SCM workflow. SCM Breeze is a set of shell scripts (for bash and zsh) that enhance your interaction with git. It integrates

SCM Breeze 2.5k Sep 23, 2021
Remove unnecessary language resources from macOS.

Monolingual A tool for removing unneeded language localization files for macOS Screenshot Architecture Monolingual consists of three parts: the sandbo

Ingmar Stein 423 Sep 17, 2021
A native OS X KeePass client

MacPass There are a lot of iOS KeePass tools around but a distinct lack of a good native macOS version. KeePass can be used via Mono on macOS but lack

MacPass 6k Sep 23, 2021
Catch: Broadcatching made easy.

Catch: Broadcatching made easy. Catch is the easiest way to do broadcatching on the Mac. Just add your feeds and new episodes will be downloaded as th

Giorgio Calderolla 387 Aug 23, 2021
🎶 Control Apple Music right from your macOS menu bar.

About Music Bar is macOS application that places music controls right in your menu bar. Installation Download and unzip the latest release. Drag the a

Musa 138 Sep 13, 2021
A Dimness and Night Shift menu bar app for macOS 🌙

Nocturnal Have more control over your screen at night About Nocturnal is a menu bar app for macOS that allows you to go the extra mile in controlling

Joshua Jon 233 Sep 20, 2021
macOS app that allows the control of Spotify and AppleMusic/iTunes music playback from the menu bar.

PlayStatus is a simple macOS app that allows the control of Spotify, Apple Music(macOS 10.15+) and iTunes including iTunes Radio/Beats1 playback from

Nikhil Bolar 79 Sep 16, 2021
use your keyboard to manage bluetooth connections on macOS

wechsel wechsel (/ˈvɛksəl/) claims to simplify the interaction with bluetooth connections on macOS. Instead of using the builtin Bluetooth menu bar, y

friedrich 57 May 5, 2021