aboutsummaryrefslogtreecommitdiff
path: root/articles/2025/Naked-DWM.html
diff options
context:
space:
mode:
Diffstat (limited to 'articles/2025/Naked-DWM.html')
-rwxr-xr-xarticles/2025/Naked-DWM.html101
1 files changed, 101 insertions, 0 deletions
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 @@
+<!doctype html>
+<html lang="EN">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="/style.css">
+ <title>Naked DWM</title>
+ </head>
+ <body>
+ <header>
+ <h1>Bloggings</h1>
+ <a href="/index.php">Back</a>
+
+ </header>
+
+<main>
+<article>
+<h2>Naked DWM</h2>
+<h3>2025-05-01</h3>
+<h4>Zero dwm patches...</h4>
+<p>Inspiration from <a href="https://youtu.be/O5VVdFWJcak">Bread on Penguins</a> and <a href="https://www.youtube.com/watch?v=g8_d2rnwQdo&t=1206s">BugsWriter</a></p>
+<p><img src="/images/blog/pywal16-screenshot.png"></p>
+<p>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 <b>dwm/config.h</b> to integrate Pywal16,
+that allows me to have a colour theme that matches whatever wallpaper I'm using.</p>
+<p>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.</p>
+<p>Install <a href="https://github.com/eylles/pywal16">pywal16</a></p>
+<pre>
+yay -S python-pywal16
+</pre>
+<h4>Modify dwm/config.h</h4>
+<p>In <b>dwm/config.h</b> I removed the default colour settings:</p>
+<pre>
+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 },
+};
+</pre>
+<p>and replaced them with this line:</p>
+<pre>
+/* Pywal16 */
+#include "/home/philip/.cache/wal/colors-wal-dwm.h"
+</pre>
+<h4>xinitrc</h4>
+<p>In my .xinitrc I have <b>wal -Rq</b> which recalls the last wallpaper setting.</p>
+<h4>Chooser script</h4>
+<p>This script chooses the wallpaper then recompiles dwm and dmenu.</p>
+<pre>
+#!/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
+</pre>
+</article>
+</main>
+<footer>
+
+<p>&nbsp;</p>
+
+<p>ยง</p>
+ </footer>
+</body>
+</html>
+
+
+
+
+
+
+
+
+
+
+