dwmblocks

my build of dwmblocks
git clone git://giovanniamaral.com/dwmblocks
Log | Files | Refs | README | LICENSE

commit e1022c4551f74cce9a4a5b30f4de4a6a4e1e9386
parent 8cedd220684064f1433749ed2a19a6184c22cf07
Author: Giovanni Amaral <giovanni@giovanniamaral.com>
Date:   Fri, 31 Jul 2026 19:46:47 -0300

Initialize personal build

Diffstat:
AREADME | 15+++++++++++++++
DREADME.md | 15---------------
Mblocks.def.h | 8+++++---
Mdwmblocks.c | 4++--
4 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/README b/README @@ -0,0 +1,15 @@ +dwmblocks +--------- +Modular status bar for dwm written in c. + +Usage +----- +To use dwmblocks first run 'make' and then install it with 'sudo make install'. +After that you can put dwmblocks in your xinitrc or other startup script to have it start with dwm. + +Modifying blocks +---------------- +The statusbar is made from text output from commandline programs. +Blocks are added and removed by editing the blocks.h header file. +By default the blocks.h header file is created the first time you run make which copies the default config from blocks.def.h. +This is so you can edit your status bar commands and they will not get overwritten in a future update. diff --git a/README.md b/README.md @@ -1,15 +0,0 @@ -# dwmblocks -Modular status bar for dwm written in c. -# usage -To use dwmblocks first run 'make' and then install it with 'sudo make install'. -After that you can put dwmblocks in your xinitrc or other startup script to have it start with dwm. -# modifying blocks -The statusbar is made from text output from commandline programs. -Blocks are added and removed by editing the blocks.h header file. -By default the blocks.h header file is created the first time you run make which copies the default config from blocks.def.h. -This is so you can edit your status bar commands and they will not get overwritten in a future update. -# patches -Here are some patches to dwmblocks that add features that I either don't want to merge in, or that require a dwm patch to work. -I do not maintain these but I will take pull requests to update them. -<br> -<a href=https://gist.github.com/IGeraGera/e4a5583b91b3eec2e81fdceb44dea717>dwmblocks-statuscmd-b6b0be4.diff</a> diff --git a/blocks.def.h b/blocks.def.h @@ -1,9 +1,11 @@ //Modify this file to change what commands output to your statusbar, and recompile using the make command. static const Block blocks[] = { /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ - {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30, 0}, - - {"", "date '+%b %d (%a) %I:%M%p'", 5, 0}, + {"", "sb-battery", 5, 0}, + {"🔆", "sb-brightness", 5, 1}, + {"", "sb-volume", 0, 2}, + {"", "sb-mailbox", 0, 3}, + {"📅", "sb-clock", 60, 0}, }; //sets delimiter between status commands. NULL character ('\0') means no delimiter. diff --git a/dwmblocks.c b/dwmblocks.c @@ -34,7 +34,7 @@ void setupsignals(); void sighandler(int signum); int getstatus(char *str, char *last); void statusloop(); -void termhandler(); +void termhandler(int signum); void pstdout(); #ifndef NO_X void setroot(); @@ -185,7 +185,7 @@ void sighandler(int signum) writestatus(); } -void termhandler() +void termhandler(int signum) { statusContinue = 0; }