npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@aminnairi/i3status

v1.1.0

Published

Library to create your own i3 status bar in Node.js using the Flux architecture

Downloads

25

Readme

@aminnairi/i3status

NPM badge Bundle size Tree shaking support Vulnerabilities count

Library to create your own i3 status bar in Node.js using the Flux architecture

Status Bar

Why

  • Because it is inspired by The Elm Architecture, Redux, and the Flux architecture.
  • Because it is written using modern ECMAScript syntax.
  • Because it is written using modern ECMAScript Modules.
  • Because it is written with functional programming in mind.
  • Because it is well documented with many examples (and many to come).
  • Because it is tested from integration to end-to-end.
  • Because it is powered by the Node.js platform and all of its operating system's API and ecosystem.
  • Because it allows you to build complex, dynamic status bars with ease.
  • Because it does not require any global installation (but you can if you want).
  • Because it does not require any yaml, env files, and is just plain JavaScript, nothing else.
  • Because it has full support for asynchronous updates through dispatches.
  • Because it has full support for i3wm click events (buttons, modfiiers, coordinates, ...).
  • Because it has full supports for i3wm blocks configuration (color, padding, separator, ...).
  • Because it has no external dependencies.
  • Because it has been made with love.

Instructions

Recommended

Requirements

Installation

Open a new terminal emulator and type the following commands.

mkdir ~/my-i3status
cd ~/my-i3status
touch index.mjs
npm install --save-exact --save @aminnairi/i3status

Open the created file index.mjs and copy/paste the following block of code into it.

import {createInterface} from "readline/promises";
import {stdin as input, stdout as output} from "process";
import {createRenderer} from "@aminnairi/i3status";

const render = createRenderer({
  createInterface,
  input,
  output
});

render({
  initialBlocks: [
    {
      full_text: "Hello, world!"
    }
  ]
});

Open the file ~/.config/i3/config and replace the following option status_command if it already exists, or add it to the bar block.

bar {
  status_command node ~/my-i3status/index.mjs
}

In the same terminal emulator you just opened, type the following command.

i3-msg reload

Manual

Requirements

Installation

Open a new terminal emulator and type the following commands

git clone https://github.com/aminnairi/i3status ~/my-i3status
cd ~/my-i3status
docker-compose run --rm npm install
docker-compose run --rm npm test
docker-compose run --rm npm run build

Choose one of the example script (for instance, simple.mjs) in the examples folder and replace the import path @aminnairi/i3status to ../build/index.mjs. Then open the file ~/.config/i3/config and replace the following option status_command if it already exists, or add it to the bar block.

bar {
  status_command node ~/my-i3status/example/simple.mjs
}

In the same terminal emulator you just opened, type the following command.

i3-msg reload

Examples

See examples.

Changelog

See CHANGELOG.md.

Contributing

See CONTRIBUTING.md.

Code of conduct

See CODE_OF_CONDUCT.md.

License

See LICENSE.