Status line generator for i3wm and (eventually) other WMs
Goals:
- integrate most of core functionality directly (checking cpu, network etc. without extra forking
- Support push and pull (polling) type of plugins
- Async (each plugin on its own timer) and sync mode with optional low power/slow update (WIP)
If you have go set up already then usually just go get github.com/XANi/uberstatus
(if any of upstream deps didn't break) if not, get the repo and:
make # will make binary in application root
mkdir -p ~/.config/uberstatus
Binaries will be made in current directory. If you dont have config already, copy one:
cp cfg/uberstatus.default.conf ~/.config/uberstatus/uberstatus.conf # copy default config
Then just put it in i3 config in section defining bars
bar {
...
status_command path/to/uberstatus/uberstatus
...
}
Each of plugins operates asynchronously and can send update of its status at any time. On each plugin update state is sent upstream (including previous cached plugin state) so it is possible to have each plugin update separetely.
Each plugin have a name (by default plugin name) and instance (in case of plugins that will be used multiple times, like network interfaces).
-config file/name
- use alternate config file-d
- enable remote debugging on localhost:6060
All plugins have interval
option defining refresh rate in miliseconds
prefix
Parameters:
long_format
/short_format
- time format, as golang formatting stringinterval
- update interval in miliseconds. Note that it can be longer than it because of run time so for update every second something like 990 ms is better
- name: disk-root
instance: df
plugin: df
config:
prefix: "💾"
mounts:
- /
- /var
- /home
prefix
will be added at beginning of the status bar. name and instance are just to distinguish between different instances
Gets stats from GPU. So far only NVIDIA is supported via nvidia-smi
which needs to be installed prior to running the plugin.
- name: gpu
plugin: gpu
config:
id: 0
type: nvidia
Click to get detailed stats
Subscribe to MQTT queue
- name: mqtt
plugin: mqtt
config:
# password included in URL
address: tcp://mqtt:mqtt@192.168.1.4:1883
lisp_filter: (aget (split (aget (split x ":" ) 1) ".") 0)
template: "P: {{ color ( intOr0 .Msg | sub100 | percentToColor ) (intOr0 .Msg | percentToBar) }} {{ color ( intOr0 .Msg | sub100 | percentToColor ) \"%\"}}"
template_on_click: "P: {{ color ( intOr0 .Msg | percentToColor ) .Msg }} %"
subscribe: collectd/some-data/phone/power-battery
lisp_filter
is zygo lisp code ran on the data read from subscribe
channel.
Main use is for formatting data received from the topic defined in subscribe
template
is Go template string working on struct:
Event{
Msg: p.lastMessage,
TS: p.lastMQTTUpdate,
})
Left click for interface's IP, right click for secondary IP (usually IPv6), middle click to display all addresses.
Parameters:
iface
- interface to use
type
- tcp/httpaddr
- address of a target, host:port format for tcp, url for http(s)
Accepts data to display in pipe. Data is updated instantly.
path
- path to named pipe (will be created if not existparse_template
- enable template parsing, that allows for using template functions like{{color #00ff00 "message"}}
. Note that some (likecolor
) will only work/make sense with markup enabledmarkup
- enable pango markup. Enabled by defaultinterval
- regenerate message every x milliseconds. Only matters if you use templates that will change with time.
This will pass data directly to i3 which means that any pango formatting it supports it works but also that you need to escape any HTMLisms (<>
and such) on your own.
You can also just disable markup (markup: false
) or use escaping function in template ({{escape "<title>hai</title>"}}
)
Simple pomodoro timer. Click button 1 (left) to start/acknowledge break, button 2 to display stats
i3blocks-compatible input. It will also pass events in compatible way so plugins like volume can be used
Parameters:
command
- command to runprefix
- prefix command with text
Example:
- name: volume
plugin: i3blocks
config:
command: /path/to/i3blocks/volume
Icinga2 plugin. Icinga2 must have API enabled and served on given URL
Parameters:
- name: icinga
plugin: icinga
config:
url: https://icinga/plugin/url
user: uber
pass: status_pass
# api_update_interval: 5m # defaults to 30s
# host_filter: icinga2 filter for hosts
# service_filter: icinga2 filter for services
System uptime. Parameters:
prefix
Displays temperature, left click for more detailed weather data
To set it up first, get you token here, then get city name or id and set it in location
Example:
- name: weather
plugin: weather
config:
openweather_api_key: 1111cccccccc11111111
openweather_location: London
weather will automatically update every 10 minutes which is way below their free tier ratelimit