Socket
Book a DemoInstallSign in
Socket

abar

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abar

0.6.2
Source
Cargo
Version published
Maintainers
0
Created
Source

abar - An asynchronous bar!

abar is a tool for generating dynamic "blocks"-style status strings.

When using minimalistic status bars, you'll generally define a number of modules and then stick them together somehow. For instance, your bar might look a bit like this:

>>> VOLUME | BATTERY | CURRENT_TIME <<<

This can come with a performance hit, however, as normally you'd have to update everything all at once. Every time you want to refresh the battery, you'd also have to refresh the volume, etc. This might seem fine, but if you ever want to rely upon something slow (such as an HTTP request) your entire bar will slow to a crawl. abar solves this problem by giving each module its own unique update cycle, monitored by a small thread pool.

What's different from other blocks-style implementations?

abar takes inspiration from the tools you might see over at suckless.org in that it's designed to be hackable. There's no configuration file, and instead the idea is that you modify your bar by directly toying with the source code.

dwmblocks is a project with a similar goal. It's pretty good, but abar differs in a few ways:

  • abar is available as both a library and a binary. This means that you can either modify a fork of this repository, or create an entirely new project using the interface available on crates.io.

  • In general, dwmblocks focuses more on integration with shell scripts, while abar focuses more on the customisability offered by direct access to the source code. You can still use bash, but it's not the primary goal here. As it's in Rust, You also get access to the cargo package manager, which can allow a newcomer to do some very advanced things relatively easily.

  • There's a much bigger focus on remote interaction. In dwmblocks, you refresh blocks using SIGKILL, while in abar you can send arbitrary commands over TCP via the command line.

Installation

Running cargo install --path . from the source directory will install the binary, while automatically pulling any dependencies you've defined in ./Cargo.toml

Usage

The main "configuration" happens in ./src/config.rs, which contains some examples to guide you through the basics. That being said, I strongly recommend "looking under the hood" and finding something to tinker with.

More specific info can be found in the documentation.

FAQs

Package last updated on 21 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.