breto

A status bar written in Go.
git clone git://git.swab.dev/breto.git
Log | Files | Refs | README | LICENSE

README.md (3504B)


      1 [![Go Report Card](https://goreportcard.com/badge/github.com/jrswab/breto)](https://goreportcard.com/report/github.com/jrswab/breto)
      2 # Breto
      3 A status bar written in Go.
      4 Currently tested with DWM, i3wm, tmux, and Polybar.
      5 
      6 ## Current Features:
      7 ### Master Branch:
      8 #### Blocks:
      9 - Date & Time
     10 - Weather via wttr.in
     11 - Total RAM not used
     12 - Total disk space left in the binary's present partition.
     13 - Audio volume percentage (pamixer needs installed)
     14 - Total battery percentage (off by default)
     15 - Icons
     16 #### Current UIs Tested:
     17 - DWM
     18 - i3wm
     19 - tmux
     20 - Polybar
     21 
     22 #### CLI Flags
     23 - `-battery=true` to enable battery block
     24 - `-dateTime=false` to remove the date/time block
     25 - `-dwm=true` to use in DWM's status bar
     26 - `-emoji=true` to enable emoji icons instead of Font Awesome
     27 - `-ram=false` to remove RAM remaining block
     28 - `-storage=false` to remove the home directory storage remaining block
     29 - `-temp=false` to remove the weather block
     30 - `-tray=false` to remove the "system" tray block
     31 - `-volume=false` to remove volume percentage block
     32 
     33 ### Icons:
     34 #### To display icons in DWM.
     35 1. Install Font Awesome 5 (or an emoji font)
     36 2. Set FontAwesome as the second font in `dwm/config.h`
     37    - eg. `static const char *fonts[] = { "Source Code Pro:size=13", "Font Awesome 5 Free:style=Regular:size=14" };`
     38    - if using an emoji font, replace the second font name with the emoji set
     39 3. Relaunch DWM
     40 
     41 #### To display in tmux or i3wm:
     42 1. Install Font Awesome 5 (or an emoji font)
     43    - Keep in mind that the icons are currently very small.
     44    - Research in progess.
     45 
     46 #### To display in Polybar:
     47 1. Install Font Awesome 5 (or an emoji font)
     48 2. Add to your Polybar config:
     49    - If not using Font Awesome search for your emoji set with `fc-list` and replace "Font Awesome 5".
     50 ```
     51 font-0 = {base font here}
     52 font-1 = "Font Awesome 5 Free:style=Regular:pixelsize=12;1"
     53 font-2 = "Font Awesome 5 Free:style=Solid:pixelsize=12;1"
     54 font-3 = "Font Awesome 5 Brands:pixelsize=12;1"
     55 ```
     56 
     57 ## How To Use:
     58 1. Clone repository.
     59 2. `cd` into the directory.
     60 3. Build the binary.
     61    - `go build`
     62 4. Edit your config file to use the new binary.
     63    - If using DWM execute with the `--dwm=true` flag.
     64 
     65 ### Adding to DWM:
     66 - If you already have a startup script for DWM just add a new line with the path to this binary.
     67 
     68 ### Addng to Tmux:
     69 - `set -g status-right "#($HOME/PATHTO/tmux-status)"`
     70  - If you have colors in this setting add the path at the end of the string
     71  - Be sure to use the correct path and name of the file you built with GO.
     72  - Running `mv breto ~/tmux-status` will allow you to use `"($HOME/tmux-status)"` in your config.
     73 - `set -g status-right-length 53`
     74  - If you are not using all the custom packages this number can be lower
     75  - This also will vary based on screen size. 53 is the minimum that worked for all current blocks on my montior.
     76  - If you notice the status getting cut off just increase the number and reload tmux.
     77 
     78 ### Adding to i3wm:
     79 - In the i3wm confige file, change `status_command ...` to `status_command PATH/TO/breto`
     80 
     81 ### Adding to Polybar:
     82 - Add the following module to your Polybar configuration file:
     83 ```
     84 [module/breto]
     85 type = custom/script
     86 exec = /path/to/breto
     87 tail = true
     88 ```
     89 
     90 ## Wttr.in Options:
     91 1. Add your area to the weather function
     92    - Area Code: 'wttr.in/~00000?format=2' 
     93    - City: 'wttr.in/~Paris?format=2'
     94 	 - More information can be found at [wttr.in/:help](https://wttr.in/:help)
     95 2. Add tweaks to `blocks/wttr.go`
     96 
     97 ## TODO:
     98 - Add CLI flag for user input for weather location.
     99 
    100 ## License:
    101 MIT