https://github.com/lsgrep/gostatus
status bar for i3wm
https://github.com/lsgrep/gostatus
Last synced: 6 months ago
JSON representation
status bar for i3wm
- Host: GitHub
- URL: https://github.com/lsgrep/gostatus
- Owner: lsgrep
- License: wtfpl
- Created: 2018-03-09T11:36:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T04:32:28.000Z (almost 5 years ago)
- Last Synced: 2024-06-20T14:18:28.988Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 2.15 MB
- Stars: 20
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## gostatus [](https://circleci.com/gh/lsgrep/gostatus)
> status bar written in Go for i3wm

#### build & install
check out [releases](https://github.com/lsgrep/gostatus/releases) or build manually.
* `go install github.com/lsgrep/gostatus@latest`
* if you want to use `ping`, `sudo setcap cap_net_raw+ep gostatus`,
* edit & copy/create `gostatus.yml`, keep in mind to update network interface and disk path accordingly
* change status_command in `~/.config/i3/config`, e.g. `status_command gostatus --config config.yml`
#### multiple monitor setup
* displays can be queried via `xrandr -q`
```
bar {
# The display is connected either via HDMI or via DisplayPort
output DP-0
status_command gostatus --config ~/.config/i3/gostatus.yml
}
bar {
output HDMI-0
status_command gostatus --config ~/.config/i3/gostatus.min.yml
}
```
#### logs
* default log location `/tmp/gostatus.log`
#### debugging
Just run it and read the `stdout`.
Except the first JSON object line, each line should be a JSON array with a leading comma(`,`), or i3bar will fail to parse the line.
```
$ ./gostatus --config config.yml
{ "version": 1, "stop_signal": 10, "cont_signal": 12, "click_events": true }[[],[{"full_text":"14 Mar 18 15:46 CST"}]
,[{"full_text":"14 Mar 18 15:46 CST"}]
,[{"full_text":" 16.28%"},{"full_text":" 7.71GB / 15.58GB"},{"full_text":"14 Mar 18 15:46 CST"}]
,[{"full_text":" 16.28%"},{"full_text":" 7.71GB / 15.58GB"},{"full_text":"14 Mar 18 15:46 CST"}]
,[{"full_text":" 16.28%"},{"full_text":"10.30.7.13","color":"#00ff00"},{"full_text":" 7.71GB / 15.58GB"},{"full_text":" / 71.18GB / 109.53GB"},{"full_text":" /data 169.68GB / 228.23GB"},{"full_text":"14 Mar 18 15:46 CST"}]
,[{"full_text":" 16.28%"},{"full_text":"10.30.7.13","color":"#00ff00"},{"full_text":" 7.70GB / 15.58GB"},{"full_text":" / 71.18GB / 109.53GB"},{"full_text":" /data 169.68GB / 228.23GB"},{"full_text":"14 Mar 18 15:46 CST"}]
,[{"full_text":" 16.28%"},{"full_text":"10.30.7.13","color":"#00ff00"},{"full_text":" 7.70GB / 15.58GB"},{"full_text":" / 71.18GB / 109.53GB"},{"full_text":" /data 169.68GB / 228.23GB"},{"full_text":"14 Mar 18 15:46 CST"}]
```
#### Inspired by
* https://github.com/burik666/yagostatus
* https://github.com/davidscholberg/goblocks