Breto; A Multi-UI Status Bar
Categories:
[Technology]
Tags:
[software],
[programming],
[open-source],
[apps]
Breto (originally called Go-Status) is a small project I wrote a few months back to display the time and date in DWM. It's written in Go and the name means "shelf" in Esperanto.
Even though it started as a way to display the time in my DWM bar it now does much more and even works in other window managers.
If you have any feature you'd like to see added feel free to send a pull request or open an issue. I would like to add as many blocks as is deemed useful by anyone using this application.
Current Features:
Blocks:
- Date & Time
- Weather via wttr.in
- Total RAM not used
- Total space left in the home directory
- Icons
Current UIs:
- DWM
- i3wm
- tmux
Icons:
To display icons in DWM:
- Install FontAwesome v4
- Set FontAwesome as the second font in
dwm/config.h
- eg.
static const char *fonts[] = { "Source Code Pro:size=13", "FontAwesome:size=14" };
- Relaunch DWM
- eg.
Current Icons:
- Tempurature
- Disk
- RAM
- Volume
- Syncthingt
- Dropboxt
- Redshift
Currently, the icons are much too small to be useful in Tmux or i3wm without further configuration.
If you have an easy way to display FontAwesome icons at the same scale as the terminal text please submit a pull request.
How To Use:
- Open main.go in a text editor.
- If cloned from Gitlab change the custom package directories from Github to Gitlab.
- Edit the last
status
variable to contain the blocks you wish to use. - Change the last line to match your UI (eg,
ui.Dwm(status)
). - Build the binary.
- Edit your config file to use the new binary.
Adding to DWM:
- Simply set
ui.Dwm(status)
, compile, and execute. - If you already have a startup script for DWM just add a new line for go-status
Addng to Tmux:
set -g status-right "#($HOME/PATHTO/tmux-status)"
- If you have colors in this setting add the path at the end of the string
- Be sure to use the correct path and name of the file you built with GO.
- Running
mv go-status ~/tmux-status
will allow you to use"($HOME/tmux-status)"
in your config.
set -g status-right-length 53
- If you are not using all the custom packages this number can be lower
- This also will vary based on screen size. 53 is the minimum that worke for all current blocks
- If you notice the status getting cut off just increase the number and reload tmux.
Adding to i3wm:
- In the i3wm confige file, change
status_command ...
tostatus_command PATH/TO/go-status
Wttr.in Options:
- Add your area to the weather function
- Area Code: 'wttr.in/~00000?format=2'
- City: 'wttr.in/~Paris?format=2'
- More information can be found at wttr.in/:help
- Add tweaks to
blocks/wttr.go
To-Do:
Get a proper name- Scale icons in tmux and i3wm
License:
MIT