• Stars
    star
    130
  • Rank 276,146 (Top 6 %)
  • Language
    Rust
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A system monitor written in Rust and C

baru baru

baru

A system monitor written in Rust and C.

baru

features

  • 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)
  • dynamic and customizable labels
  • customizable format output
  • configuration in YAML

Baru gathers the information from /sys and /proc filesystems (filled by the kernel). Except audio and network modules which use C libraries.
There is no memory leak over time. All modules are threaded. Thanks to this design (as well Rust and C), baru is lightweight and efficient. It can run at high refresh rate with a minimal processor footprint.

The audio module communicates with the PipeWire/PulseAudio server through client API to retrieve its data.
Wireless and wired modules use the netlink interface with the help of libnl to talk directly to kernel and retrieve their data.
In addition, wireless module uses the 802.11 API.

Baru is modular. This means that only the modules you want to see are instantiated and executed.

prerequisite

  • libnl (for wired and wireless modules)
  • libpulse (for sound and mic modules)

install

Rust is a language that compiles to native code and by default statically links all dependencies.
Simply download the latest release of the compiled binary and use it (do not forget to make it executable chmod +x baru).

For Arch Linux users, baru is present as a package in the Arch User Repository.

configuration

The binary looks for the config file baru.yaml located in $XDG_CONFIG_HOME/baru/ (default to $HOME/.config/baru/).
If the config file is not found, baru prints an error and exits.
All options are detailed here.

Example:

format: '%m  %f  %c  %t  %b  %i  %s   %w%e  %a    %d'
tick: 50
battery:
  full_design: true
  low_level: 30
  full_label: '*'
  charging_label: '^'
  discharging_label: 'b'
  low_label: '!'
  unknown_label: '?'
  format: '%l %v'
brightness:
  label: 'l'
  format: '%l %v'
cpu:
  label: 'c'
  high_label: '!'
  format: '%v %l'
cpu_freq:
  tick: 100
  high_level: 60
  label: 'f'
  high_label: '!'
  format: '%v %l'
memory:
  core_inputs: 2..5
  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..5
  label: 't'
  high_label: '!'
  format: '%v %l'
wired:
  discrete: true
  label: 'e'
  disconnected_label: '\'
  format: '%l'
wireless:
  interface: wlan0
  display: Essid
  max_essid_len: 5
  label: 'w'
  disconnected_label: '\'
  format: '%v %l'

usage

$ baru

credits

Clรฉment Dommerc for providing me with the C code for the lib netlink, wireless part.

license

Mozilla Public License 2.0

More Repositories

1

darcula

A Vim color scheme reproduction of the official JetBrains IDE Darcula theme
Vim Script
359
star
2

suit.nvim

A neovim plugin that replaces default input and select text prompts with nice floating windows
Lua
44
star
3

bato

Small program to send battery notifications
Rust
37
star
4

monark.nvim

Show mode changes right next to the cursor
Lua
33
star
5

barow

A minimalist statusline for n/vim
Vim script
32
star
6

coBra

[co]erced [bra]cket, a simple vim plugin that forces brackets and quotes to be smart
Vim Script
27
star
7

milcheck

Display the status of your pacman mirrorlist and the Arch Linux lastest news right in your terminal
Rust
26
star
8

lsp_spinner.nvim

neovim plugin to retrieve the name of the running LSP client(s) and display a spinner when there are wip job
Lua
24
star
9

dmap.nvim

nvim plugin providing a subtle overview of LSP diagnostics
Lua
16
star
10

oterm.nvim

A neovim plugin to open terminal quickly and nicely.
Lua
13
star
11

dark.nvim

A dark color scheme for nvim
Lua
11
star
12

ponton.nvim

A minimal statusline
Lua
9
star
13

tenaille.nvim

nvim plugin to wrap the visual selection in brackets and quotes
Lua
8
star
14

floaterm.nvim

A neovim plugin to open terminal in floating window.
Lua
8
star
15

dot

my dโ—tfiles
Shell
8
star
16

apekey

list and browse your XMonad keymap
Rust
6
star
17

espresso.nvim

Espresso โ˜• a nvim colorscheme
Lua
3
star
18

fzfTools

n/vim plugin that provides practical tools powered by fzf
Vim Script
2
star
19

nvim_config

My personal nvim config
Lua
2
star
20

vassal.nvim

Spawn external process from nvim
Lua
2
star
21

dwm

My dwm custom build
C
2
star
22

oterm

n/vim plugin to quickly open terminals
Vim script
2
star
23

lswip.nvim

Nvim plugin which displays a spinner whenever there is LSP job in progress
Lua
1
star
24

nnnvi

a n/vim plugin that uses nnn as a file manager
Vim script
1
star
25

barowGit

A module to display the current git branch in barow statusline
Vim script
1
star
26

doums

me
1
star
27

ruzy

a Lua library for fuzzy search
Rust
1
star
28

prometric

Prometheus exporter for PaperMC server
Kotlin
1
star
29

poc_prisma

TypeScript
1
star
30

rg.nvim

ripgrep integration in neovim
Lua
1
star