summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-05-26 07:26:34 -0400
committerGitHub <noreply@github.com>2020-05-26 07:26:34 -0400
commit373d96844fb93e4a2e5aee4d3b9f866c032190a4 (patch)
tree14e17d12341cec0d909212d1dbdac07f5a955325
parentaaeebc4b367f4482ddc983e30a8d97e87b6c701a (diff)
parent0666c8a14d4c87ec7fda7d9fa146f6a292126b3b (diff)
downloaddwmblocks-373d96844fb93e4a2e5aee4d3b9f866c032190a4.tar.gz
dwmblocks-373d96844fb93e4a2e5aee4d3b9f866c032190a4.tar.bz2
dwmblocks-373d96844fb93e4a2e5aee4d3b9f866c032190a4.zip
Merge branch 'master' into forkbefore
-rw-r--r--README.md58
-rw-r--r--config.h11
2 files changed, 50 insertions, 19 deletions
diff --git a/README.md b/README.md
index 2c4a7b3..b6a4685 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,46 @@
# dwmblocks
+
Modular status bar for dwm written in c.
-# modifying blocks
-The statusbar is made from text output from commandline programs.
-Blocks are added and removed by editing the blocks.h header file.
-# Luke's bulid
-I have dwmblocks read my preexisting scripts [here in my dotfiles repo](https://github.com/LukeSmithxyz/voidrice/tree/master/.local/bin/statusbar).
-So if you want my build out of the box, download those and put them in your `$PATH`.
-I do this to avoid redundancy in LARBS, both i3 and dwm use the same statusbar scripts.
-# signalling changes
-For example, the audio module has the update signal 10 by default.
-Thus, running `pkill -RTMIN+10 dwmblocks` will update it.
-# 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/).
+
+# Modifying blocks
+
+The statusbar is made from text output from commandline programs. Blocks are
+added and removed by editing the config.h file.
+
+# Luke's build
+
+I have dwmblocks read my preexisting scripts
+[here in my dotfiles repo](https://github.com/LukeSmithxyz/voidrice/tree/master/.local/bin/statusbar).
+So if you want my build out of the box, download those and put them in your
+`$PATH`. I do this to avoid redundancy in LARBS, both i3 and dwm use the same
+statusbar scripts.
+
+# 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 audio 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 if you signal an unexpected signal to dwmblocks, it will probably
+crash. So if you disable a module, remember to also disable any cronjobs or
+other scripts that might signal to that module.
+
+# 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).
diff --git a/config.h b/config.h
index 0b134d1..5c71ce5 100644
--- a/config.h
+++ b/config.h
@@ -6,22 +6,25 @@ static const Block blocks[] = {
{"", "pacpackages", 0, 8},
{"", "news", 0, 6},
/* {"", "crypto", 0, 13}, */
+ /* {"", "price bat \"Basic Attention Token\" 🦁", 0, 20}, */
+ /* {"", "price btc Bitcoin 💰", 0, 21}, */
+ /* {"", "price lbc \"LBRY Token\" 📚", 0, 22}, */
{"", "torrent", 20, 7},
/* {"", "memory", 10, 14}, */
- /* {"", "cpu", 10, 13}, */
- /* {"", "moonphase", 18000, 5}, */
+ /* {"", "cpu", 10, 18}, */
+ /* {"", "moonphase", 18000, 17}, */
{"", "weather", 18000, 5},
{"", "mailbox", 180, 12},
/* {"", "nettraf", 1, 16}, */
{"", "volume", 0, 10},
- {"", "battery | tr \'\n\' \' \'", 5, 3},
+ {"", "battery", 5, 3},
{"", "clock", 60, 1},
{"", "internet", 5, 4},
{"", "help-icon", 0, 15},
};
//sets delimeter between status commands. NULL character ('\0') means no delimeter.
-static char delim = '|';
+static char delim = ' ';
// Have dwmblocks automatically recompile and run when you edit this file in
// vim with the following line in your vimrc/init.vim:
Software created with 💖