From 420ceb49b53a8fa9d8ba8443e42e50cd7bd7cea9 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Sun, 12 Jul 2026 11:08:50 +0200 Subject: update --- articles/2025/Naked-DWM.html | 101 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100755 articles/2025/Naked-DWM.html (limited to 'articles/2025/Naked-DWM.html') diff --git a/articles/2025/Naked-DWM.html b/articles/2025/Naked-DWM.html new file mode 100755 index 0000000..bb64c73 --- /dev/null +++ b/articles/2025/Naked-DWM.html @@ -0,0 +1,101 @@ + + + + + + + Naked DWM + + +
+

Bloggings

+ Back + +
+ +
+
+

Naked DWM

+

2025-05-01

+

Zero dwm patches...

+

Inspiration from Bread on Penguins and BugsWriter

+

+

I've been messing with DWM patches but I went back to naked DWM. +The only caveat is a couple of lines of code in dwm/config.h to integrate Pywal16, +that allows me to have a colour theme that matches whatever wallpaper I'm using.

+

It's possible to patch DWM with the Xresources patch but patches are version dependant and can be a pain. +I prefer simple and maintainable.

+

Install pywal16

+
+yay -S python-pywal16
+
+

Modify dwm/config.h

+

In dwm/config.h I removed the default colour settings:

+
+static const char col_gray1[]       = "#222222";
+static const char col_gray2[]       = "#444444";
+static const char col_gray3[]       = "#bbbbbb";
+static const char col_gray4[]       = "#eeeeee";
+static const char col_cyan[]        = "#005577";
+static const char *colors[][3]      = {
+	/*               fg         bg         border   */
+	[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
+	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
+};
+
+

and replaced them with this line:

+
+/* Pywal16 */ 
+#include "/home/philip/.cache/wal/colors-wal-dwm.h"
+
+

xinitrc

+

In my .xinitrc I have wal -Rq which recalls the last wallpaper setting.

+

Chooser script

+

This script chooses the wallpaper then recompiles dwm and dmenu.

+
+#!/usr/bin/env bash
+# Choose a wallpaper 
+# requires nsxiv, pywal16
+# ~/.local/bin is in PATH
+
+FOLDER=~/Pictures/wallpaper
+# thumbnail display of images
+CHOICE=$(nsxiv -otb $FOLDER/*) 
+
+wal -i $CHOICE
+
+# Post process
+
+# DWM
+cd ~/.local/src/dwm
+make clean ; make
+rm -f ~/.local/bin/dwm
+cp dwm ~/.local/bin
+
+# DWMMENU
+rm -f ~/.local/dmenu*
+cd ~/.local/src/dmenu
+make clean ; make
+cp {dmenu,dmenu_run,dmenu_path} ~/.local/bin
+
+
+
+ + + + + + + + + + + + + + -- cgit v1.3.1