dwmblocks-ashish/README.md

64 lines
2.4 KiB
Markdown
Raw Normal View History

2020-07-03 21:04:11 +00:00
# dwmblocks
2020-07-18 14:35:48 +00:00
Modular status monitor for dwm written in C with features including
clickability, cursor hinting and color.
2020-07-03 21:04:11 +00:00
# Usage
2020-07-13 20:00:57 +00:00
`dwmblocks [-d <delimiter>]`
2020-07-03 21:04:11 +00:00
# Modifying blocks
2020-07-17 23:11:37 +00:00
Blocks are added and removed by editing the `blocks.h` file. Read it for more
2020-07-03 21:04:11 +00:00
info.
2020-07-06 21:23:07 +00:00
# Colored output and Clickability
2020-07-03 21:04:11 +00:00
The patches folder contains a patch for dwm which is required for dwmblocks to
function properly. It adds support for colored text, clickability and cursor
hinting when hovering on text output of clickable blocks (inspired by polybar).
Clickability is inspired by the 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 by default).
Colored output is inspired by the statuscolors patch for dwm. To add colors,
2020-07-07 10:01:53 +00:00
have your programs for the blocks output raw characters from '\x0b' to '\x31'.
'\x0b' in status text switches the active colorscheme to the first one in the
2020-07-03 21:04:11 +00:00
scheme array in dwm and so on. See
[statuscolors patch](https://dwm.suckless.org/patches/statuscolors/)
2020-07-07 10:01:53 +00:00
for more info. Keep in mind that you have to start from '\x0b' instead of '\x01'
2020-07-03 21:04:11 +00:00
as instructed on the page.
# Signaling changes
2020-07-13 20:00:57 +00:00
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.
2020-07-03 21:04:11 +00:00
# xgetrootname
2020-07-06 20:28:41 +00:00
It is a tiny program to get the current root name. May prove helpful in
2020-07-03 21:04:11 +00:00
debugging.
# Installation
Clone the repository and run `make clean install` after getting in the project
directory. By default the program is installed in `$HOME/.local/bin`. If
xgetrootname is required run `make xgetrootname`.
# Acknowledgements
Some ideas and code was taken from other projects. Credits for those go to -
* torrinfail ([original dwmblocks implementation](https://github.com/torrinfail/dwmblocks))
* Daniel Bylinka ([statuscmd patch for dwm](https://dwm.suckless.org/patches/statuscmd/))
* Jeremy Jay ([statuscolors patch for dwm](https://dwm.suckless.org/patches/statuscolors/))
2020-07-06 21:23:07 +00:00
# See also
* [dsblocks](https://github.com/ashish-yadav11/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.