- Notifications
You must be signed in to change notification settings - Fork5
doums/baru
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A simple system monitor for WM statusbar
Baru is a lightweight system monitor for WM status-bar.
It can be used as a provider with any status-bar that can read fromstdout
.
Likexmobar,lemonbar,dwm etc…
features ∎prerequisite ∎install ∎configuration ∎usage ∎credits ∎license
- date and time
- battery (level, status, design level based)
- wireless (state, essid, signal strength)
- wired (state)
- audio sink and source (level, muted)
- brightness
- cpu usage, frequency and temperature
- memory (percent or used/total in gigabyte/gibibyte)
- weather current condition andtemperature (OpenWeatherMap)
- dynamic and customizable labels, play nicely with icons andnerd-fonts
- customizable format output
- configuration in YAML
The following system libraries are required:
- libnl (for wired and wireless modules)
- libpulse (for sound and mic modules)
The binary looks for the config filebaru.yaml
locatedin$XDG_CONFIG_HOME/baru/
(default to$HOME/.config/baru/
).
If the config file is not found, baru prints an error and exits.
You can find the full config detailshere.
TIPS: To test and debug your config run baru from the terminal like this:
RUST_LOG=debug baru -l stdout
Use the rootformat
option to customize baru output.
You can pick which modules you want to display. Using the special markup%x
wherex
is the letter of the module.These markups are replaced by the output of the corresponding modules.
Modules available:
a
batteryb
brightnessc
cpu usaged
datetimee
wiredf
cpu frequencym
memoryi
micr
weathers
soundt
temperaturew
wireless
Module output:
Each module takes aformat
option.%l
and%v
are respectively the label and the current value of the module.
format:'%m %f %c %t %b %i %s %w%e %a %d'tick:50# modules configurationbattery:full_design:truelow_level:30full_label:'*'charging_label:'^'discharging_label:'b'low_label:'!'unknown_label:'?'format:'%l %v'# display label and valuebrightness:label:'l'format:'%l %v'cpu_usage:label:'c'high_label:'!'format:'%v %l'cpu_freq:tick:100high_level:60label:'f'high_label:'!'format:'%v %l'memory:label:'m'high_label:'!'format:'%v %l'mic:label:'i'mute_label:'.'format:'%v %l'sound:label:'s'mute_label:'.'format:'%v %l'temperature:core_inputs:2..5label:'t'high_label:'!'format:'%v %l'wired:discrete:truelabel:'e'disconnected_label:'\'format:'%l'# display label onlywireless:interface:wlan0display:Essidmax_essid_len:5label:'w'disconnected_label:'\'format:'%v %l'weather:tick:300# seconds# your openweathermap api keyapi_key:1234567890location:'Metz'unit:metricicons:clear_sky:[ '', '' ]# day, nightpartly_cloudy:[ '', '' ]cloudy:''very_cloudy:''shower_rain:''rain:''thunderstorm:''snow:''mist:''format:'%v'
baru -h
When spawning baru from your WM/status-bar you can pass the-l file
flag
if you want baru to log into a file (useful for debugging).
Logs are written to the directory$XDG_CACHE_HOME/baru/
(defaultto$HOME/.cache/baru/
).
baru -l file
Baru gathers the information from/sys
and/proc
filesystems (filled by thekernel).
Except audio and network modules which use C libraries.
All modules are threaded and loaded on-demand.
Thanks to this modular design (as well Rust and C), baru is lightweight andefficient.
It can run at high refresh rate with a minimal cpu footprint.
The audio module communicates withthePipeWire/PulseAudio
serverthroughclient API toretrieve its data. Wireless and wired
modules use the netlink interface with the helpoflibnl to talk directly
to kernel and retrieve their data.
In addition, wireless module usesthe802.11API.
- Rust
- CMake
- libnl and libpulse present on the system
RUST_LOG=trace cargo run -- -l stdout
Clément Dommerc for providing me with the C code for the libnetlink
, wirelesspart.
Mozilla Public License 2.0
About
A simple system monitor for WM statusbar