Find a file
2020-12-30 02:25:22 +05:30
blocks Added possibility to extend number of clickable blocks 2020-12-27 20:59:38 +05:30
daemons Removed unnecessary quotes after case from scripts 2020-10-30 22:25:41 +05:30
patches Bug fixes and improvements - dwm patches 2020-12-30 02:25:22 +05:30
.gitignore Added gitignore 2020-07-18 18:00:09 +05:30
blocks.h Consistency 2020-12-29 13:58:01 +05:30
dwmblocks.c Bug fix and improvement - nanosleep 2020-12-29 13:56:08 +05:30
GNUmakefile Fix install: cannot stat 'xgetrootname': No such file or directory 2020-12-24 00:29:45 -06:00
LICENSE Added license 2020-07-13 14:44:52 +05:30
README.md Info related improvements 2020-12-27 21:38:58 +05:30
sigdwmblocks.c Removed unnecessary header 2020-12-25 01:02:01 +05:30
xgetrootname.c Removed unnecessary printf from xgetrootname.c 2020-12-05 04:19:53 +05:30

dwmblocks

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

Usage

dwmblocks [-d <delimiter>]

Modifying blocks

Blocks are added and removed by editing blocks.h file. Read it for more info.

The provided blocks use siji font for icons.

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 dwmblocks to function properly. It will add support for colored text, clickability and cursor hinting when hovering on clickable blocks (inspired by polybar).

Clickability is inspired by statuscmd patch for dwm. On clicking on text corresponding to a clickable block, the program specified to handle clicks for that block is executed with the first argument specifying which button was clicked (1 for left, 2 for middle and 3 for right).

Colored output is inspired by statuscolors patch for dwm. To add colors, have your programs for the blocks output raw characters from \x0b to \x31. \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 statuscolors patch for dwm for more info. Keep in mind that you have to start from \x0b instead of \x01 as instructed on the page.

Signaling changes

To signal a specific block to update, run sigdwmblocks <signal> [<sigval>]. <sigval> is optional and must be an integer. If provided, it is passed as the first argument to the program specified for updating the block.

xgetrootname

A tiny program to get the current root name. May prove helpful in debugging.

Installation

Clone the repository and run

cd dwmblocks
sudo make install clean

Acknowledgements

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

See also

  • dsblocks - A clone of this project with the only difference being that C functions instead of external programs are used to update blocks and handle clicks.