dwmblocks/README.md

73 lines
2.5 KiB
Markdown
Raw Permalink 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
2020-07-28 09:11:55 +00:00
signaling, clickability, cursor hinting and color.
2020-07-03 21:04:11 +00:00
# Usage
`dwmblocks`
2020-07-03 21:04:11 +00:00
# Configuration
2020-07-03 21:04:11 +00:00
Refer to [config.h](config.def.h). It allows addition/removal of blocks and a
few other configurations.
2020-11-16 13:32:52 +00:00
> `make`, the first time you run it, or `make config.h` will create config.h by
> copying [config.def.h](config.def.h).
2021-01-17 12:21:30 +00:00
2020-11-16 13:32:52 +00:00
> The provided blocks use siji font for icons.
2020-07-03 21:04:11 +00:00
2020-07-06 21:23:07 +00:00
# Colored output and Clickability
2020-07-03 21:04:11 +00:00
2020-11-30 20:47:13 +00:00
[patches](patches) folder contains two patches for dwm, one for dwm already
2020-11-16 13:32:52 +00:00
patched with systray patch and the other for vanilla dwm. One of the patches,
2020-08-17 22:34:14 +00:00
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).
2020-07-03 21:04:11 +00:00
2020-11-16 13:32:52 +00:00
Clickability is inspired by statuscmd patch for dwm. On clicking on text
2020-07-03 21:04:11 +00:00
corresponding to a clickable block, the program specified to handle clicks for
that block is executed with the first argument specifying which button was
2020-11-16 13:32:52 +00:00
clicked (1 for left, 2 for middle and 3 for right).
2020-07-03 21:04:11 +00:00
2020-11-16 13:32:52 +00:00
Colored output is inspired by statuscolors patch for dwm. To add colors, have
2021-03-20 06:11:12 +00:00
your programs for the blocks output raw characters from `\x0b` to `\x1f`. `\x0b`
2020-11-16 13:32:52 +00:00
in status text switches active colorscheme to the first one in the colors array
2020-12-27 16:08:58 +00:00
defined in dwm's config.h and so on. See
2020-11-16 13:32:52 +00:00
[statuscolors patch for dwm](https://dwm.suckless.org/patches/statuscolors/)
2020-12-27 16:08:58 +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-12-23 19:21:40 +00:00
A tiny program to get the current root name. May prove helpful in debugging.
2020-07-03 21:04:11 +00:00
# Installation
2020-12-23 18:26:34 +00:00
Clone the repository and run
```
cd dwmblocks
2021-02-28 06:05:07 +00:00
make
sudo make install
2020-12-23 18:26:34 +00:00
```
2020-07-03 21:04:11 +00:00
# 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
2020-07-24 09:38:16 +00:00
project with the only difference being that C functions instead of external
programs are used to update blocks and handle clicks.