Find a file
2024-10-14 11:12:59 +03:00
blocks add config and blocks 2024-10-14 11:12:59 +03:00
blocks.def Fixed typo/bug in systray patch; fixed cpu block 2021-08-20 21:01:44 +05:30
daemons add config and blocks 2024-10-14 11:12:59 +03:00
patches Patches for 6.5 2024-06-23 04:41:10 +05:30
sigdwmblocks Fixed bug - fd of LOCKFILE should be closed before spawn 2021-08-03 16:58:21 +05:30
xgetrootname Fixed xgetrootname 2022-09-18 07:13:47 +05:30
.gitignore add config and blocks 2024-10-14 11:12:59 +03:00
block.h Reorganization again 2021-02-11 00:16:35 +05:30
config.def.h Fixed typo/bug in systray patch; fixed cpu block 2021-08-20 21:01:44 +05:30
config.h add config and blocks 2024-10-14 11:12:59 +03:00
dwmblocks.c Use void for functions with no parameters 2021-08-17 22:04:37 +05:30
GNUmakefile Add DESTDIR to PIDDIR 2023-07-19 13:29:53 +05:30
LICENSE Updated year in license 2021-01-02 14:40:31 +05:30
README.md Fixed README 2021-03-20 11:41:12 +05:30

dwmblocks

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

Usage

dwmblocks

Configuration

Refer to config.h. It allows addition/removal of blocks and a few other configurations.

make, the first time you run it, or make config.h will create config.h by copying config.def.h.

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 \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 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
make
sudo make install

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.