README.md (2613B)
1 # dwmblocks 2 3 Modular status monitor for dwm written in C with features including 4 signaling, clickability, cursor hinting and color. 5 6 # Usage 7 8 `dwmblocks [-d <delimiter>]` 9 10 # Modifying blocks 11 12 Blocks are added and removed by editing the [blocks.h](blocks.h) file. Read it 13 for more info. 14 15 # Colored output and Clickability 16 17 The patches folder contains two patches for dwm, one for dwm already patched 18 with systray patch and the other for dwm without systray. One of the patches, 19 whichever appropriate, is essential for dwmblocks to function properly. It will 20 add support for colored text, clickability and cursor hinting when hovering on 21 clickable blocks (inspired by polybar). 22 23 Clickability is inspired by the statuscmd patch for dwm. On clicking on text 24 corresponding to a clickable block, the program specified to handle clicks for 25 that block is executed with the first argument specifying which button was 26 clicked (1 for left, 2 for middle and 3 for right by default). 27 28 Colored output is inspired by the statuscolors patch for dwm. To add colors, 29 have your programs for the blocks output raw characters from '\x0b' to '\x31'. 30 '\x0b' in status text switches the active colorscheme to the first one in the 31 scheme array in dwm and so on. See 32 [statuscolors patch](https://dwm.suckless.org/patches/statuscolors/) 33 for more info. Keep in mind that you have to start from '\x0b' instead of '\x01' 34 as instructed on the page. 35 36 # Signaling changes 37 38 To signal a specific block to update, run `sigdwmblocks <signal> [<sigval>]`. 39 `<sigval>` is optional and must be an integer. If provided, it is passed as the 40 first argument to the program specified for updating the block. 41 42 # xgetrootname 43 44 It is a tiny program to get the current root name. May prove helpful in 45 debugging. 46 47 # Installation 48 49 Clone the repository and run `make install clean` after getting in the project 50 directory. By default the program is installed in `$HOME/.local/bin` 51 (see the [GNUmakefile](GNUmakefile)). If xgetrootname is required run 52 `make xgetrootname`. 53 54 # Acknowledgements 55 56 Some ideas and code was taken from other projects. Credits for those go to - 57 58 * torrinfail ([original dwmblocks implementation](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/)) 61 62 # See also 63 64 * [dsblocks](https://github.com/ashish-yadav11/dsblocks) - A clone of this 65 project with the only difference being that C functions instead of external 66 programs are used to update blocks and handle clicks.