From: A-Larsen Date: Wed, 14 Oct 2026 22:25:31 +0000 (-0400) Subject: readme X-Git-Url: https://nyquistdev.net/git/?a=commitdiff_plain;h=e6607d355098413fb7d92a7f78fe710dbf15c24d;p=dwm-config.git readme --- diff --git a/README.adoc b/README.adoc index f36b987..b415004 100644 --- a/README.adoc +++ b/README.adoc @@ -87,6 +87,26 @@ image::rules-struct.png[rules-struct] Tells dwm if it should focus the application when it launches or launch it silently. +== DWM Blocks + +I do use dwm blocks for my status bar, here is what my blocks.h file looks like. +There are some needed scripts for this that are shown in the next section. + +[source, c] +---- +//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*/ + {" 👤 ", "echo \"$USER\"", 0, 0}, + {"🗓️", "date '+%b %d (%a) %I:%M%p'", 5, 0}, + {"💾 ", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30, 0}, + {"", "bash -c 'vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po \"\\d+(?=%)\" | head -n1); if pactl get-sink-mute @DEFAULT_SINK@ | grep -q yes; then echo \"🔇 $vol%\"; else echo \"🔊 $vol%\"; fi'", 0, 17}, + { "👀 ", "/usr/local/bin/dwm-wake-up-status", 0, 10 }, + {"", "echo \"$(/usr/local/bin/battery) \"", 5, 0}, +}; +---- + + == Dependency Scripts There are several scripts that work with my DWM config. You can find these diff --git a/rendered.html b/rendered.html index ea522d9..526b755 100644 --- a/rendered.html +++ b/rendered.html @@ -1295,6 +1295,29 @@ silently.

+

DWM Blocks

+
+
+

I do use dwm blocks for my status bar, here is what my blocks.h file looks like. +There are some needed scripts for this that are shown in the next section.

+
+
+
+
//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*/
+	{" 👤 ", "echo \"$USER\"", 0, 0},
+	{"🗓️", "date '+%b %d (%a) %I:%M%p'", 5, 0},
+	{"💾 ", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30, 0},
+    {"", "bash -c 'vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po \"\\d+(?=%)\" | head -n1); if pactl get-sink-mute @DEFAULT_SINK@ | grep -q yes; then echo \"🔇 $vol%\"; else echo \"🔊 $vol%\"; fi'", 0, 17},
+    { "👀 ", "/usr/local/bin/dwm-wake-up-status", 0, 10 },
+	{"", "echo \"$(/usr/local/bin/battery) \"", 5, 0},
+};
+
+
+
+
+

Dependency Scripts