Home

Awesome

anybar

Control AnyBar

Note

Requires the --unstable deno flag to be used.

Usage

import anybar from "https://x.nest.land/anybar@1.0.0/module.js";

anybar("red");
// This turns AnyBar menu bar dot red.
// 🔴

anybar("green", {anybar: 9876});
// AnyBar could run on a specific port.
// 🟢

anybar("blue", {anybar: 9876, deno: 54321});
// If this module needs to run on a specific port for some reason.
// 🔵

API

anybar(style, ports)

style

The style of the dot you want AnyBar to display.

ports

The port options.

ports.anybar

The UDP port AnyBar runs on.

ports.deno

The port this module should use to communicate with AnyBar. Only numbers between 1024 and 65535 are allowed, anything else will throw a RangeError.

Acknowledgments

This module, especially the API, was heavily inspired by the node module for the same purpose by sindresorhus.