Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

66 lines
2.5 KiB

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