breto

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

README.md (3578B)


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