Skip to content
faervan edited this page Jan 12, 2025 · 14 revisions

Welcome to the bar-rs wiki!

While the configuration options aren't extensive at the moment, it's still good to know what tools you've got!
There are some configuration examples at default_config

Config path

On Linux, the config path is $XDG_DATA_HOME/bar-rs/bar-rs.ini or $HOME/.local/share/bar-rs/bar-rs.ini

Example:
/home/alice/.config/bar-rs/bar-rs.ini

If it isn't, you may check here

Syntax

bar-rs uses an ini-like configuration (as provided by configparser), which should be pretty easy to understand and use.

It looks like this:

[section]
key = value

Data types

Data type Description Examples
bool Either yes or no true or false, 1 or 0, enabled or disabled...
Color A color as defined in the CSS Color Module Level 4 rgba(255, 0, 0, 0.5), blue, rgb(255, 255, 255)
String Just a String DP-1
float A floating point number 20, 5.8
u32 A positive integer of range $2^{32}$ (0-4294967295) 0, 50, 1920
Value list A list of values, separated by commas 20, 5, 20

General

The general section contains three options:

Option Description Data type Default
monitor The monitor on which bar-rs should open. If this is set, bar-rs will override the default values of width and height (only the defaults, not the ones you specify). String /
hot_reloading Whether bar-rs should monitor the config file for changes bool true
width The total width of the bar. The default depends on whether the bar is vertical or horizontal. u32 30 or 1920
height The total height of the bar. The default depends on whether the bar is vertical or horizontal. u32 1080 or 30
anchor The anchor to use. Can be top, bottom, left or right. This decides whether the bar is vertical or not. String top

Example:

[general]
monitor = DP-1
hot_reloading = true
anchor = top

General Styling

Some of these options might get overwritten by module-specific settings.

Option Description Data type Default
background Background color of the status bar Color rgba(0, 0, 0, 0.5)
spacing Space between the modules, can be different for left, center and right Value list (float) 20, 20, 20
local_spacing Space between the items in a module (e.g. icon and text) float 10
font_size Default font size float 16
icon_size Default icon size float 20
text_color Default text color Color white
icon_color Default icon color Color white

Example:

[style]
background = rgba(0, 0, 0, 0.5)
spacing = 20, 5, 20
font_size = 16
icon_size = 20
text_color = white
icon_color = white
local_spacing = 15

Modules

The [module] section sets the enabled modules for each side:

Example:

[modules]
left = hyprland.workspaces, hyprland.window
center = date, time
right = media, volume, cpu, memory

The following modules are currently available:

Module Description
cpu Shows the current CPU usage
memory Shows the current memory usage
time Shows the local time
date Shows the local date
battery Shows the current capacity and remaining time
media Shows the currently playing media as reported by playerctl
volume Shows the current audio volume as reported by wpctl, updated by pactl
hyprland.window Shows the name of the currently focused window
hyprland.workspaces Shows the currently open workspaces

To configure modules individually use a section name like this:

[module:{{name}}]

where {{name}} is the name of the module, e. g. cpu

All modules accept spacing, font_size, icon_size, text_color and icon_color, which overrides the defaults defined in [style]
Most modules also support ìcon, which is a String representing the icon to use.

date and time support a format option to format the date/time. See chrono.

media supports max_length and max_title_length.

hyprland.window and wayfire.window accept a max_length, which represents the maximum character length of the window name
hyprland.workspaces additionally accepts active_color and active_background
wayfire.workspaces supports fields to set the workspace names using their row and column (see in the example below). Find some nice icons to use here

Example:

[module:time]
icon_size = 24
format = %H:%M

[module:hyprland.workspaces]
active_color = black
active_background = rgba(255, 255, 255, 0.5)

[module:wayfire.workspaces]
(0, 0) = 󰈹
(1, 0) = 
(2, 0) = 󰓓
(0, 1) = 
(1, 1) = 
(2, 1) = 
(0, 2) = 
(1, 2) = 
(2, 2) = 

Clone this wiki locally