README.md (2512B)
1 # dsblocks 2 3 Modular status monitor for dwm, written and meant to be extended in C, with 4 features including signaling, clickability, cursor hinting and color. 5 6 > The project is only meant for people comfortable with the C language. See 7 > [dwmblocks](https://github.com/ashish-yadav11/dwmblocks) if you are not one 8 > of those. 9 10 # Usage 11 12 `dsblocks` 13 14 # Modifying blocks 15 16 Each block has two functions associated with it, one responsible for updating 17 what is shown in status and the other responsible for handling clicks. Take a 18 look at [config.h](config.h) and files in [blocks](blocks) folder. Functions 19 defined in [util.c](util.c) might prove helpful when adding your own blocks. 20 21 > The provided blocks and helpers are what I personally use. They may or may 22 > not work for others. They are mainly provided for suggestion purposes. (They 23 > use siji font for icons.) 24 25 If you want to contribute to the project and have written a block which might 26 prove helpful to others, add a pull request putting your block in contrib 27 folder. 28 29 # Colored output and Clickability 30 31 [patches](patches) folder contains two patches for dwm, one for dwm already 32 patched with systray patch and the other for vanilla dwm. One of the patches, 33 whichever appropriate, is essential for dsblocks to function properly. It will 34 add support for colored text (inspired by statuscolors patch for dwm), 35 clickability (inspired by statuscmd patch for dwm) and cursor hinting when 36 hovering on clickable blocks (inspired by polybar). 37 38 To add colors to status, have your functions output raw characters from `\x0b` 39 to `\x1f`. `\x0b` in status text switches active colorscheme to the first one in 40 the colors array defined in dwm's config.h and so on. See [util.h](util.h) and 41 [statuscolors patch for dwm](https://dwm.suckless.org/patches/statuscolors/) 42 for more info. Keep in mind that you have to start from `\x0b` instead of `\x01` 43 as instructed on the patch's page. 44 45 # Signaling changes 46 47 To signal a specific block to update, run `sigdsblocks <signal> [<sigval>]`. 48 `<sigval>` is optional and must be an integer. 49 50 # xgetrootname 51 52 A tiny program to get the current root name. May prove helpful in debugging. 53 54 # Acknowledgements 55 56 Some ideas and code was taken from other projects. Credits for those go to - 57 58 * torrinfail ([dwmblocks](https://github.com/torrinfail/dwmblocks)) 59 * Daniel Bylinka ([statuscmd patch for dwm](https://dwm.suckless.org/patches/statuscmd/)) 60 * Jeremy Jay ([statuscolors patch for dwm](https://dwm.suckless.org/patches/statuscolors/))