github.com/Code-Hex/battery@v1.0.0/README.md (about) 1 battery - Draw battery unicode art written by Go 2 ======= 3 ![sc_battery](https://cloud.githubusercontent.com/assets/6500104/19550024/6018c768-96e2-11e6-9ae1-f66b2406b8a7.png) 4 [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) 5 6 battery unicode art on your tmux sessions or the terminal. 7 8 ## Status 9 (2022-07-29) 10 macOS build artifacts are **cgo-less** now!! 11 use goreleaser to release artifacts. 12 13 (2019-11-03) 14 Supported to display patched fonts. 15 Very Thanks [TsutomuNakamura](https://github.com/TsutomuNakamura)!! 16 17 Let's run `battery -i` after installed patched fonts. [See more details](https://github.com/Code-Hex/battery#support-patched-fonts). 18 19 (2018-05-01) 20 Supported to show elapsed time. 21 Very Thanks [delphinus](https://github.com/delphinus)!! 22 23 Let's run `battery -e` 24 25 ![elapsed time](https://user-images.githubusercontent.com/1239245/39427036-388223ce-4cbd-11e8-859a-5363cdac3452.png) 26 27 (2016-10-24) 28 linux supported. 29 Thanks [mattn](https://github.com/mattn)!! 30 31 (2016-10-21) 32 windows supported. 33 34 (2016-10-20) 35 Now, this command can use mac user only. 36 However, I hope to support ~~windows~~ and ~~linux~~, bsd in future. 37 So, plz help me (´;ω;`) 38 39 ## Installation 40 41 ### Mac and Linux users via Homebrew 42 43 ``` 44 $ brew update 45 $ brew install Code-Hex/tap/battery 46 ``` 47 48 ### Go 49 50 ``` 51 $ go install github.com/Code-Hex/battery/cmd/battery@latest 52 ``` 53 54 ### Binary 55 56 You can download from [here](https://github.com/Code-Hex/battery/releases) 57 58 ## Usage 59 For tmux user, please write `#(battery -t)` in your `.tmux.conf` 60 Please refer to [this](https://github.com/Code-Hex/dotfiles/blob/master/tmux/.tmux.conf#L82) 61 62 ### Support patched fonts 63 You can display the status of battery with patched fonts. 64 Installing the font, Inconsolata Nerd Font Complete.otf for example, you can do it like below. 65 66 * For mac 67 ``` 68 cd ~/Library/Fonts/ 69 wget https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/Inconsolata/complete/Inconsolata%20Nerd%20Font%20Complete.otf 70 ``` 71 72 * For Linux 73 ``` 74 cd ~/.local/share/fonts 75 wget https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/Inconsolata/complete/Inconsolata%20Nerd%20Font%20Complete.otf 76 ``` 77 78 * For Windows 79 ``` 80 * Open your browser then fill this url 81 https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/Inconsolata/complete/Inconsolata%20Nerd%20Font%20Complete.otf 82 * Double click the file that you downloaded and the window will be opened 83 * Click the install button 84 ``` 85 86 Your environment might require to reboot the OS. If so, reboot your OS. 87 Then open your terminal and set your preferences to use it. 88 89 Then for tmux user, please write `#(battery -t -i)` in your `.tmux.conf`. 90 91 ![patched_font_100](https://user-images.githubusercontent.com/10674169/58262398-2d0ead80-7db5-11e9-816e-7df5a416aed2.png) 92 ![patched_font_50](https://user-images.githubusercontent.com/10674169/58262403-2f710780-7db5-11e9-8a8c-e63c2833d088.png) 93 ![patched_font_10](https://user-images.githubusercontent.com/10674169/58262412-31d36180-7db5-11e9-98b7-4cea9bd68d07.png) 94 95 ## Contributor 🎊 96 - [mattn](https://github.com/mattn) 97 - [yasu47b](https://github.com/yasu47b) 98 - [b4b4r07](https://github.com/b4b4r07) 99 - [delphinus](https://github.com/delphinus) 100 - [TsutomuNakamura](https://github.com/TsutomuNakamura) 101 102 ## Author 103 [codehex](https://twitter.com/CodeHex) 104