o
odinpkg.dev
packages / library / barbarian

barbarian

afb1816library

simple wayland bar

GPL-2.0 · updated 1 month ago

BARbarian - simple wayland bar

Demo

demo.png

Configuration

The bar looks for $XDG_CONFIG_HOME/barbarian/config.json5 or $HOME/.config/barbarian/config.json5 example config

Useful

To restart or stop a module right-click it while holding CTRL

Custom modules

The bar communicates with modules via stdio A module must write either plain text or json to stdout

Example module output:

{
    "items": [
        {"text": "Hello, world", "fg": "ffffffff", "bg": "000000ff"}
    ],
    "tooltip": "Some tooltip",
    "menu": {
        "open_on": "Left",   
        "items": [
            {"key": "Hello", "value": "World"}
        ]
    }
}

Note

The json must not contain new lines

The module receives events(click, scroll, menu-item selected) via stdin

Example module input:

{
    "type": "Click", // Can be "Scroll" or "Menu",
    "event": {
        "button": "Left", // Can be "Right" or "Middle"
        "item": 0, // Clicked item index
    }
}
{
    "type": "Scroll", 
    "event": {
        "dir": -1,
    }
}
{
    "type": "Menu", 
    "event": {
        "key": "Hello",
    }
}

Look for examples in ./example-modules

TODO:

  • Test multiple monitors
  • Scaling

Dependencies

  • odin compiler
  • wayland
  • egl

Installation

Arch-based distros

git clone https://github.com/xb-bx/barbarian
cd barbarian
makepkg -si

Other

git clone https://github.com/xb-bx/barbarian --recursive
sudo make install