Customisable gtk-layer-shell wlroots/sway bar written in rust.
Go to file
Jake Stanger 3cf9be89fd
feat: global icon theme setting
BREAKING CHANGE: This removes the `icon_theme` option from `launcher` and `focused`. You will need to set this at the top of your config instead.
2023-01-30 11:51:01 +00:00
.github chore(github): update issue templates 2023-01-04 17:36:19 +00:00
.idea chore(intellij): update run configs 2022-09-25 22:50:05 +01:00
docs feat: global icon theme setting 2023-01-30 11:51:01 +00:00
examples feat: dynamic tooltips 2022-11-30 22:27:56 +00:00
src feat: global icon theme setting 2023-01-30 11:51:01 +00:00
.gitignore chore: initial commit 2022-08-14 14:30:13 +01:00
Cargo.lock refactor: replace icon loading with improved general image loading 2023-01-29 17:46:02 +00:00
Cargo.toml fix(music): remote mpris album art not showing 2023-01-30 11:47:56 +00:00
CHANGELOG.md docs: update CHANGELOG.md for v0.9.0 [skip ci] 2023-01-28 14:50:58 +00:00
CONTRIBUTING.md feat(logging): IRONBAR_LOG and IRONBAR_FILE_LOG env vars 2022-10-16 13:42:59 +01:00
flake.lock flake.lock: Update 2023-01-01 01:06:03 +00:00
flake.nix s/pkgs.system/pkgs.hostPlatform.system/g 2023-01-02 23:52:06 -08:00
LICENSE chore: add mit license 2022-08-14 14:32:54 +01:00
README.md feat: add nix flake support 2022-11-26 21:29:16 +00:00

Ironbar

Ironbar is a customisable and feature-rich bar for wlroots compositors, written in Rust. It uses GTK3 and gtk-layer-shell.

The bar can be styled to your liking using CSS and hot-loads style changes. For information and examples on styling please see the wiki.

Screenshot of fully configured bar with MPD widget open

Installation

Cargo

cargo install ironbar

crate

Arch Linux

yay -S ironbar-git

aur package

Nix Flake

Example

Here is an example nix flake that uses ironbar, this is just a proof of concept, please adapt it to your config

{
  # Add the ironbar flake input
  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  inputs.ironbar = {
    url = "github:JakeStanger/ironbar";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  inputs.hm = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = inputs: {
    homeManagerConfigurations."USER@HOSTNAME" = inputs.hm.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
      modules = [
        # And add the home-manager module
        inputs.ironbar.homeManagerModules.default
        {
          # And configure
          programs.ironbar = {
            enable = true;
            config = {};
            style = "";
          };
        }
      ];
    };
  };
}

Binary Caching

There is also a cachix cache at https://app.cachix.org/cache/jakestanger incase you don't want to compile ironbar!

Source

git clone https://github.com/jakestanger/ironbar.git
cd ironbar
cargo build --release
# change path to wherever you want to install
install target/release/ironbar ~/.local/bin/ironbar

repo

Running

All of the above installation methods provide a binary called ironbar.

You can set the IRONBAR_LOG or IRONBAR_FILE_LOG environment variables to error, warn, info, debug or trace to configure the log output level. These default to IRONBAR_LOG=info and IRONBAR_FILE_LOG=error. File output can be found at ~/.local/share/ironbar/error.log.

Configuration

Ironbar gives a lot of flexibility when configuring, including multiple file formats and options for scaling complexity: you can use a single config across all monitors, or configure different/multiple bars per monitor.

A full configuration guide can be found here.

Styling

To get started, create a stylesheet at .config/ironbar/style.css. Changes will be hot-reloaded every time you save the file.

A full styling guide can be found here.

Project Status

This project is in alpha, but should be usable. Everything that is implemented works and should be documented. Proper error handling is in place so things should either fail gracefully with detail, or not fail at all.

There is currently room for lots more modules, and lots more configuration options for the existing modules. The current configuration schema is not set in stone and breaking changes could come along at any point; until the project matures I am more interested in ease of use than backwards compatibility.

A few bugs do exist, and I am sure there are plenty more to be found.

The project will be actively developed as I am using it on my daily driver. Bugs will be fixed, features will be added, code will be refactored.

Contribution Guidelines

Please check here.

Acknowledgements

  • Waybar - A lot of the initial inspiration, and a pretty great bar.
  • Rustbar - Served as a good demo for writing a basic GTK bar in Rust
  • Smithay Client Toolkit - Essential in being able to communicate to Wayland