uberstatus

i3 status line generator

View on GitHub

Uberstatus

byzanz-record -x 3065 -y 0 -h 22 -w 775 uberstatus.gif

Status line generator for i3wm and (eventually) other WMs

Goals:

Installation

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
    ...
}

Operation

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).

Commandline options

Plugins

All plugins have interval option defining refresh rate in miliseconds

CPU

CPUFreq

Clock

Parameters:

Disk free

    - 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

GPU

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

Memory

Click to get detailed stats

MQTT

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:   "
        template_on_click: "P:  %"
        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,
	})

Network

Left click for interface’s IP, right click for secondary IP (usually IPv6), middle click to display all addresses.

Parameters:

Ping

Pipe

Accepts data to display in pipe. Data is updated instantly.

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 (``)

Pomodoro

Simple pomodoro timer. Click button 1 (left) to start/acknowledge break, button 2 to display stats

I3blocks

i3blocks-compatible input. It will also pass events in compatible way so plugins like volume can be used

Parameters:

Example:

    - name: volume
      plugin: i3blocks
      config:
        command: /path/to/i3blocks/volume

Uptime

System uptime. Parameters:

Weather

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