Modular status monitor for dwm written in C, configured in TOML.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Listeria monocytogenes 4e3443df24
add Copyright notice
15 hours ago
blocks handle unexpected output from pa-subscribe 3 days ago
example mv config.toml -> example 2 weeks ago
helpers update battery updating udev rule 2 weeks ago
patches Fixed patches 1 year ago
sigdsblocks update error message 2 weeks ago
xgetrootname Fixed xgetrootname 6 months ago
.gitignore ignore config.h 5 months ago
LICENSE add Copyright notice 15 hours ago
Makefile use simple assignment 2 days ago
README.md mv shared.h ->> util.h 2 weeks ago
config.mk use simple assignment 2 days ago
dsblocks.c rename e_atexit() -> atext_or_exit() 1 week ago
toml2c.py mv config.py -> toml2c.py 2 weeks ago
util.c rename e_atexit() -> atext_or_exit() 1 week ago
util.h rename e_atexit() -> atext_or_exit() 1 week ago

README.md

dsblocks

Modular status monitor for dwm, written in C, configured in TOML, with features including signaling, clickability, cursor hinting and color.

Usage

$ dsblocks

Modifying blocks

Each block has two functions associated with it, one responsible for updating what is shown in status and the other responsible for handling clicks (after handling a click you may choose to update the corresponding block, see buttonhandler()).

Take a look at config.toml and files in blocks folder. Functions defined in util.c might prove useful when adding your own blocks.

The provided blocks and helpers are what I personally use. They may or may not work for others. They are mainly provided for suggestion purposes (they use Font Awesome for icons).

If you choose to change the configuration, make sure to rebuild and reinstall:

$ make
# make install

Colored output and Clickability

patches folder contains two patches for dwm, one for dwm already patched with systray patch and the other for vanilla dwm. One of the patches, whichever appropriate, is essential for dsblocks to function properly. It will add support for colored text (inspired by statuscolors patch for dwm), clickability (inspired by statuscmd patch for dwm) and cursor hinting when hovering on clickable blocks (inspired by polybar).

To add colors to status, have your functions output raw characters from \x0b to \x1f. \x0b in status text switches active colorscheme to the first one in the colors array defined in dwm's config.h and so on. See util.h and statuscolors patch for dwm for more info. Keep in mind that you have to start from \x0b instead of \x01 as instructed on the patch's page.

Signaling changes

To signal a specific block to update, run

$ sigdsblocks block.name [sigval]

[sigval] is optional and must be an integer, if not specified, it defaults to NIL (defined in util.h).

xgetrootname

A small utility to get the current root name. May prove useful in debugging.

Acknowledgements

Some ideas and code was taken from other projects. Credits for those go to -