Files
suckless/dwmblocks/patches/dwmblocks-00-all-patches.diff
T
2026-05-09 10:26:32 +02:00

36 lines
1.3 KiB
Diff

diff --git a/blocks.def.h b/blocks.def.h
index dbb3305..10516bd 100644
--- 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},
+ /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
+ {"", "mpc status | head -1", 0, 1},
+ {"net:", "nmcli n c", 10, 0},
+ {"b:", "cat /sys/class/power_supply/BAT0/capacity", 60, 0},
+ {"v:", "wpctl get-volume @DEFAULT_SINK@ | awk -F \": \" '{print $2}'", 0, 2},
+ {"", "date +'%a %b %d, %H:%M'", 60, 0},
};
//sets delimiter between status commands. NULL character ('\0') means no delimiter.
diff --git a/dwmblocks.c b/dwmblocks.c
index c8f77b7..7dd795c 100644
--- a/dwmblocks.c
+++ b/dwmblocks.c
@@ -204,8 +204,8 @@ int main(int argc, char** argv)
#endif
delimLen = MIN(delimLen, strlen(delim));
delim[delimLen++] = '\0';
- signal(SIGTERM, termhandler);
- signal(SIGINT, termhandler);
+ signal(SIGTERM, sighandler);
+ signal(SIGINT, sighandler);
statusloop();
#ifndef NO_X
XCloseDisplay(dpy);