Skip to content
/ bar-rs Public

A simple status bar for hyprland, niri and wayfire, written in rust using iced-rs

License

Notifications You must be signed in to change notification settings

Faervan/bar-rs

Repository files navigation

bar-rs

A simple status bar, written using iced-rs (specifically the pop-os fork of iced, which supports the wlr layer shell protocol)

image

2024-12-29_17-16

Vertical status bars are only experimentally supported right now

Currently bar-rs supports only a bare minimum of configuration. It works on Wayland compositors implementing the wlr layer shell protocol, but right now only features hyprland, Niri and Wayfire modules for active workspace and window display.

For a list of all currently supported modules, see the Wiki

Features

  • Dynamic module activation/ordering
  • Hot config reloading
  • very basic style customization
  • basic vertical bar support
  • a base set of useful modules
  • hyprland workspace + window modules
  • wayfire workspace + window modules
  • niri workspace + window modules
  • sway workspace + window modules
  • deeper style customization
  • custom modules
  • additional modules (wifi, pacman updates...)
  • system tray support
  • plugin api (for custom rust modules)
  • custom fonts
  • X11 support
  • Module interactivity (tooltips, popups, buttons)
  • ...

Installation

I aim for a release on the AUR after the first milestone is reached. For now, you have to build bar-rs yourself.

Building

To use bar-rs you have to build the project yourself (very straight forward on an up-to-date system like Arch, harder on "stable" ones like Debian due to outdated system libraries)

# Clone the project
git clone https://github.com/faervan/bar-rs.git
cd bar-rs

# Build the project - This might take a while
cargo build --release

# Install the bar-rs helper script to easily launch and kill bar-rs
bash install.sh

# Optional: Clean unneeded build files afterwards:
find target/release/* ! -name bar-rs ! -name . -type d,f -exec rm -r {} +

Extra dependencies

bar-rs depends on the following cli utilities:

  • free
  • grep
  • awk
  • printf
  • pactl
  • wpctl
  • playerctl

Usage

Launch bar-rs using the bar-rs script (after installing it using the install.sh script):

bar-rs open

Alternatively, you may launch bar-rs directly:

./target/release/bar-rs
# or using cargo:
cargo run --release

Configuration

Example configurations can be found in default_config.
See the Wiki for more.

Logs

If bar-rs is launched via the bar-rs script, it's logs are saved to /tmp/bar-rs.log and should only contain anything if there is an error. If an error occurs and all dependencies are installed on your system, please feel free to open an issue

Recommendations + feature requests

If you have an idea on what could improve bar-rs, or you would like to see a specific feature implemented, please open an issue.

Contributing

If you want to contribute, create an issue about the feature you'd like to implement or comment on an existing one. You may also contact me on discord.

Contributing by creating new modules should be pretty easy and straight forward if you know a bit about rust. You just have to implement the Module and Builder traits for your new module and register it in src/modules/mod.rs.
Take a look at docs.iced.rs for info about what to place in the view() method of the Module trait.

Extra credits

Next to all the great crates this projects depends on (see Cargo.toml) and the cli utils listed in Extra dependencies, bar-rs also uses NerdFont (see assets/3270)

About

A simple status bar for hyprland, niri and wayfire, written in rust using iced-rs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published