You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.6 KiB
Markdown

# dwmblocks
4 years ago
Modular status monitor for dwm written in C with features including
4 years ago
signaling, clickability, cursor hinting and color.
# Usage
`dwmblocks`
# Modifying blocks
Blocks are added and removed by editing [config.h](config.h) file. Some other
configurations can also be done through the file. Read it for more info.
4 years ago
> Change the PATH macro defined at the top of the file. It should point to the
> folder where your scripts are saved.
4 years ago
> The provided blocks use siji font for icons.
# Colored output and Clickability
4 years ago
[patches](patches) folder contains two patches for dwm, one for dwm already
4 years ago
patched with systray patch and the other for vanilla dwm. One of the patches,
4 years ago
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).
4 years ago
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
4 years ago
clicked (1 for left, 2 for middle and 3 for right).
4 years ago
Colored output is inspired by statuscolors patch for dwm. To add colors, have
your programs for the blocks output raw characters from `\x0b` to `\x31`. `\x0b`
4 years ago
in status text switches active colorscheme to the first one in the colors array
defined in dwm's config.h and so on. See
4 years ago
[statuscolors patch for dwm](https://dwm.suckless.org/patches/statuscolors/)
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
4 years ago
A tiny program to get the current root name. May prove helpful in debugging.
# Installation
4 years ago
Clone the repository and run
```
cd dwmblocks
sudo make install clean
```
# 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/))
# 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.