Async xsetroot status bar updater made in Go
- Go 94.6%
- Shell 5.4%
| battery | ||
| brightness | ||
| datetime | ||
| network | ||
| username | ||
| volume | ||
| weather | ||
| .gitignore | ||
| config.json | ||
| go.mod | ||
| go.sum | ||
| LICENSE.md | ||
| main.go | ||
| PKGBUILD | ||
| README.md | ||
gostatbar
Async xsetroot status bar updater made in Go
Installation
Arch Linux
Clone the git repository and run makepkg -si, the pkgbuild will take care of the rest
git clone https://git.fibermouse.xyz/mkowalski/gostatbar.git
cd gostatbar
makepkg -si
gostatbar
Build it yourself
Make sure you have Go installed
go --version
Then, clone the repo, and cd
git clone https://git.fibermouse.xyz/mkowalski/gostatbar.git
cd gostatbar
Compile the application and optionally copy it to /usr/local/bin/
go build -o gostatbar main.go
cp gostatbar /usr/local/bin/
All done (as long as /usr/local/bin/ is in your $PATH that is)
gostatbar
Usage
Gostatbar will attempt to read the following locations for a config file:
- "$XDG_CONFIG_HOME/gostatbar/config.json"
- "$HOME/.config/gostatbar/config.json"
If neither is readable, a default config will be used as fallback.
The default config, for convenience installed at "/usr/share/gostatbar/config.json" looks as follows:
{
"mode": "xsetroot",
"start": " ",
"separator": " | ",
"end": " |",
"widgets": [
{
"type": "username"
},
{
"type": "network",
"update_sec": 5,
"args": {
"hide_addresses": false,
"hide_down": false,
"hide_loopback": false,
"show_nonglobal": false,
"show_temporary": false
}
},
{
"type": "volume",
"update_sig": "SIGUSR1"
},
{
"type": "weather",
"update_sec": 900,
"args": {
"latitude": 50.03,
"longitude": 19.56,
"api": "api.open-meteo.com"
}
},
{
"type": "brightness",
"update_sig": "SIGUSR2"
},
{
"type": "battery",
"update_sec": 5
},
{
"type": "datetime",
"update_sec": 1,
"args": {
"format": "RFC1123"
}
}
]
}