Skip to main content

The ultimate DIY statusline generator for i3wm.

About

i3-dstatus is a statusline generator for i3 that you can use to display system information you may be interested in. i3 comes with i3status which has many limitations. It has no plugin interface. It has no support for events and relies on polling for all its information, which makes it surprisingly heavy on resources. It has a weird config file format that makes it difficult to configure.

Other projects have come along to make up for these weaknesses and many of them do a great job. i3-dstatus is for users who want a more flexible statusline that can be achieved from editing options in a configuration file but without having to learn a complicated plugin api to create custom statusline entries.

This is accomplished by allowing users to update the statusline through interprocess communication using DBUS. i3-dstatus exposes a DBUS service that you can use to update the statusline simply in pretty much any programming language and from any process (maybe even in a cron!).

  • No configuration file is required

  • Update the statusline from multiple processes

  • Update the statusline from any language (even from the command line!)

  • No complicated plugin api to learn

Installing

i3-dstatus is on PyPI.

pip install i3-dstatus

Usage

Use i3-dstatus as your status command in your bar block like so:

bar {
    status_command i3-dstatus clock
}

Pass the path of statusline generator scripts you want to run as arguments to i3-dstatus. Passing a relative path will start the script from the generators included with i3-dstatus from the generator path. Using an absolute path or a ~/ home relative path will call the appropriate path. The blocks will appear on i3bar in the order the generators were given on the command line.

Configuration

Generator scripts will look for ~/.i3-dstatus.conf for configuration options. See i3-dstatus.conf in the repo for an example. The configuration file should be a single YAML object. (More documentation to come).

Updating the Statusline

The dbus service exposes the method show_block to update the statusline. This method takes a dict of variants. Pass an object that conforms to the i3bar input protocol to show a block.

You can clear a block by omitting the “full_text” member or setting it to the empty string.

You can update the statusline from a python script. Just use a script like this:

from dbus_next.aio import MessageBus
from dbus_next import Variant

bus = await MessageBus().connect()
introspection = await bus.introspect('com.dubstepdish.i3dstatus', '/com/dubstepdish/i3dstatus')
obj = bus.get_proxy_object('com.dubstepdish.i3dstatus', '/com/dubstepdish/i3dstatus')
i3dstatus = obj.get_interface('com.dubstepdish.i3dstatus')
await i3dstatus.call_show_block({
    'name': Variant('s', 'test'),
    'full_text': Variant('s', 'hello world')
})

You can update the statusline from any language with dbus bindings (which is pretty much all of them). You can even update the statusline from the command line!

dbus-send --session \
    --dest=com.dubstepdish.i3dstatus \
    --type=method_call \
    /com/dubstepdish/i3dstatus \
    com.dubstepdish.i3dstatus.show_block \
    dict:string:string:name,test,full_text,'hello world'

Contributing

Please report bugs, request feature, write documentation, and add generators to the i3dstatus/generators directory. i3-dstatus is a community project so feedback is welcome!

License

This work is available under a FreeBSD License (see LICENSE).

Copyright © 2014, Tony Crisci

All rights reserved.

Metadata

Release files for i3-dstatus 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for i3-dstatus 0.1.1
File Size Uploaded Provenance
i3-dstatus-0.1.1.tar.gz 12.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for i3-dstatus 0.1.1
File Interpreter ABI Platform
i3_dstatus-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / i3-dstatus-0.1.1.tar.gz

Download URL i3-dstatus-0.1.1.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3e70312635315aa76f4ce971424b4e29545ef5545c937f143c559ff5366076b1
BLAKE2b-256 checksum
How to use checksums
09f57e7c71a826f9379cd762d90bbbb5c429b314bd73c808f53a7bf656b6b6e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.2 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

Release files / i3_dstatus-0.1.1-py3-none-any.whl

Download URL i3_dstatus-0.1.1-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
955c6a0363515bf7f3225af0a02b47b66e216e4f69268ddf30578b3547c36b33
BLAKE2b-256 checksum
How to use checksums
8a27d28f905c6826b98af08a322a9b4169965cf7d1c465f99b5129d3c9277a97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.2 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

Security for i3-dstatus 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page