blob: aa0ee0541aceba075202b1501b537cf8c0a58e43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# dwmblocks
Modular status bar for dwm written in c.
# ZachIR's fork of Luke Smith's config of dwmblocks
Hence, most of what you see below will be very familiar if you read Luke's
README.
# Modifying blocks
The statusbar is made from text output from commandline programs. Blocks are
added and removed by editing the config.h file.
# ZachIR's build
I have dwmblocks read my preexisting scripts
[here in my scripts repo](https://gitlab.com/zachir/scripts).
So if you want my build out of the box, download those and put them in your
`$PATH`.
# Signaling changes
Most statusbars constantly rerun every script every several seconds to update.
This is an option here, but a superior choice is giving your module a signal
that you can signal to it to update on a relevant event, rather than having it
rerun idly.
For example, the volume module has the update signal 10 by default. Thus,
running `pkill -RTMIN+10 dwmblocks` will update it.
You can also run `kill -44 $(pidof dwmblocks)` which will have the same effect,
but is faster. Just add 34 to your typical signal number.
My volume module *never* updates on its own, instead I have this command run
along side my volume shortcuts in dwm to only update it when relevant.
Note that all modules must have different signal numbers.
# Clickable modules
Like i3blocks, this build allows you to build in additional actions into your
scripts in response to click events. See the above linked scripts for examples
of this using the `$BLOCK_BUTTON` variable.
For this feature to work, you need the appropriate patch in dwm as well. See
[here](https://dwm.suckless.org/patches/statuscmd/).
Credit for those patches goes to Daniel Bylinka (daniel.bylinka@gmail.com).
|