commit d04a72d219d160b3feebc2cf48d356fba18cf69a
parent e72fd7d4b2722d495212cfe91b3825d15b49fddf
Author: cowmonk <rekketstone@duck.com>
Date: Wed, 7 May 2025 08:29:33 -0700
Code blocks look better
Diffstat:
| M | atom.xml | | | 66 | ++++++++++++++++++++++++++++++++++++++++++++++-------------------- |
| M | blog4.html | | | 66 | ++++++++++++++++++++++++++++++++++++++++++++++-------------------- |
2 files changed, 92 insertions(+), 40 deletions(-)
diff --git a/atom.xml b/atom.xml
@@ -43,26 +43,38 @@ See, once you have a working system, there isn’t a need to keep on configu
<h1 id="a-c-compiler"><strong>A C Compiler:</strong></h1>
<p>Most likely, you’ll want <code>gcc</code>. It’s the most common C compiler everyone gets.</p>
<p>If you’re on a Debian-based system (like Mint), you can usually get this and other essential tools by installing <code>build-essential</code>.</p>
-<pre><code class="language-bash"> $ sudo apt install build-essential
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo apt install build-essential |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>For Arch users (for the “I use Arch btw” furries):</p>
-<pre><code class="language-bash"> $ sudo pacman -S base-devel
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo pacman -S base-devel |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>And for Fedora folks:</p>
-<pre><code class="language-bash"> $ sudo dnf groupinstall "Development Tools" "Development Libraries"
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo dnf group install "Development Tools" "Development Libraries" |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<h1 id="make"><strong>Make:</strong></h1>
<p>This is a build automation tool that will, well, “<em>make</em>” dwm for you. It usually comes with the <code>build-essential</code> or <code>base-devel</code> packages.</p>
<h1 id="libx11-development-files"><strong>LibX11 development files:</strong></h1>
<p>DWM interacts with the X Window System, so you’ll need the development headers for it. Often called something like <code>libx11-dev</code> or <code>libX11-devel</code>.</p>
<p>Debian:</p>
-<pre><code class="language-bash"> $ sudo apt install libx11-dev libxft-dev libxinerama-dev
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo apt install libx11-dev libxft-dev libxinerama-dev |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>Arch:</p>
-<pre><code class="language-bash"> $ sudo pacman -S libx11 libxft libxinerama
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo pacman -S libx11 libxft libxinerama |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>Fedora:</p>
-<pre><code class="language-bash"> $ sudo dnf install libX11-devel libXft-devel libXinerama-devel
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo dnf install libX11-devel libXft-devel libXinerama-devel |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p><em>(Note: <code>libxft-dev</code> is for font rendering and <code>libxinerama-dev</code> is handy for multi-monitor setups, which you’ll probably want later on!)</em></p>
<p>Got all that? Sweet!</p>
@@ -79,7 +91,9 @@ However I recommend personally to get their official <a href="https://dl.suckles
<p>Take a peek. You’ll see a bunch of <code>.c</code> files, a <code>Makefile</code>, and the golden goose: <strong>config.def.h</strong>.</p>
<h2 id="the-infamous-">The Infamous <code>config.h</code></h2>
<p>This is where the magic happens, folks. <code>config.def.h</code> is the <em>default</em> configuration. You’re not supposed to edit this directly. Instead, you copy it to <code>config.h</code>:</p>
-<pre><code class="language-bash"> $ cp config.def.h config.h
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ cp config.def.h config.h |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>Now, config.h is <strong>your</strong> personal configuration file. Open it up with your favorite text editor. You’ll see C arrays defining your keys, your tags, your fonts, your colors.
It might look a bit intimidating at first, but it’s surprisingly straightforward.</p>
@@ -88,28 +102,36 @@ It might look a bit intimidating at first, but it’s surprisingly straightf
<p>Still in your dwm directory? Good. Time to compile!
This is the part that sounds scary but is usually super simple thanks to the Makefile.</p>
<p>To compile and install it system-wide:</p>
-<pre><code class="language-bash"> $ sudo make clean install
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo make clean install |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>Or, if you prefer not to install it system-wide immediately yet (which is a good idea for testing):</p>
-<pre><code class="language-bash"> $ make
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ make |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>If all your prerequisites were met, this should complete without errors. You’ll now have a dwm executable file in the directory (and runnable in your terminal if
you ran the system wide installation)!</p>
<p>To run dwm, you’ll typically need to configure your .xinitrc file to launch it.
For example, you could add this line to your ~/.xinitrc:</p>
-<pre><code class="language-bash"> exec dwm
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| exec dwm |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>For the people who run a Display Manager which is more likely (i.e gdm, sddm, lightdm, etc.). You’ll need to create a .desktop file.
This file basically has the information and stuff for the thing to see and run it. You’ll need to create one in the /usr/share/xsessions/.
And here’s an example <strong>dwm.desktop</strong> for reference:</p>
<p>/usr/share/xsessions/dwm.desktop:</p>
-<pre><code>[Desktop Entry]
-Encoding=UTF-8
-Name=dwm
-Comment=Dynamic window manager
-Exec=dwm
-Icon=dwm
-Type=XSession
+<pre><code class="language-bash">┌────────────────────────────────────┐
+| [Destop Entry] |
+| Encoding=UTF-8 |
+| Name=dwm |
+| Comment=Dynamic window manager |
+| Exec=dwm |
+| Icon=dwm |
+| Type=XSession |
+└────────────────────────────────────┘
</code></pre>
<p>The default keybinding for the Terminal is <em>Alt+Shift+Return</em>. Any other keybindings can be found in config.h, it shouldn’t be hard to
understand the giant struct declaration. Comments left by the suckless team are your friends! Read them!</p>
@@ -135,9 +157,11 @@ package manager. Once you’ve done that here are the general steps:</p>
<li><p>Find a Patch: Head over to the dwm patches page. Find a patch you like. Let’s say you want the autostart patch,
which allows you to run commands automatically when dwm starts (I highly reccomend this especially if you’re running from a display manager!).</p></li>
<li><p>Download the Patch: Download the .diff file for the patch. Save it somewhere, perhaps in a patches subdirectory within your dwm source folder.</p></li>
-<li><p>Apply the Patch: In your dwm source directory, use the patch command:</p></li>
+<li><p>Apply the Patch: In your dwm source directory, use the patch command: </p></li>
</ol>
-<pre><code class="language-bash"> patch -Np1 -i patchfile.diff
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ patch -Np1 -i /path/to/patchfile.diff |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<ol start="4">
<li><p>Resolve Conflicts (If Any): Sometimes, patches might conflict, especially if they modify the same lines of code or if you’re applying a patch meant
@@ -145,7 +169,9 @@ for an older version of dwm. This will result in .rej (rejected) files. You̵
at the .rej files to see what couldn’t be applied. This is the trickiest part, but it gets easier with practice. Start with simple, popular patches.</p></li>
<li><p>Recompile: After applying a patch (and resolving any conflicts), you need to recompile!</p></li>
</ol>
-<pre><code class="language-bash"> $ sudo make clean install
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo make clean install |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>And that’s the patching dance! It can be a bit fiddly, especially when patches conflict, but it gives you incredible control over your window manager.
Also, a quick note! Some patches might change the config.def.h, add these new changes to your config.h since they are default configs for the new patches.</p>
diff --git a/blog4.html b/blog4.html
@@ -65,26 +65,38 @@ See, once you have a working system, there isn’t a need to keep on configu
<h1 id="a-c-compiler"><strong>A C Compiler:</strong></h1>
<p>Most likely, you’ll want <code>gcc</code>. It’s the most common C compiler everyone gets.</p>
<p>If you’re on a Debian-based system (like Mint), you can usually get this and other essential tools by installing <code>build-essential</code>.</p>
-<pre><code class="language-bash"> $ sudo apt install build-essential
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo apt install build-essential |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>For Arch users (for the “I use Arch btw” furries):</p>
-<pre><code class="language-bash"> $ sudo pacman -S base-devel
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo pacman -S base-devel |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>And for Fedora folks:</p>
-<pre><code class="language-bash"> $ sudo dnf groupinstall "Development Tools" "Development Libraries"
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo dnf group install "Development Tools" "Development Libraries" |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<h1 id="make"><strong>Make:</strong></h1>
<p>This is a build automation tool that will, well, “<em>make</em>” dwm for you. It usually comes with the <code>build-essential</code> or <code>base-devel</code> packages.</p>
<h1 id="libx11-development-files"><strong>LibX11 development files:</strong></h1>
<p>DWM interacts with the X Window System, so you’ll need the development headers for it. Often called something like <code>libx11-dev</code> or <code>libX11-devel</code>.</p>
<p>Debian:</p>
-<pre><code class="language-bash"> $ sudo apt install libx11-dev libxft-dev libxinerama-dev
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo apt install libx11-dev libxft-dev libxinerama-dev |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>Arch:</p>
-<pre><code class="language-bash"> $ sudo pacman -S libx11 libxft libxinerama
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo pacman -S libx11 libxft libxinerama |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>Fedora:</p>
-<pre><code class="language-bash"> $ sudo dnf install libX11-devel libXft-devel libXinerama-devel
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo dnf install libX11-devel libXft-devel libXinerama-devel |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p><em>(Note: <code>libxft-dev</code> is for font rendering and <code>libxinerama-dev</code> is handy for multi-monitor setups, which you’ll probably want later on!)</em></p>
<p>Got all that? Sweet!</p>
@@ -101,7 +113,9 @@ However I recommend personally to get their official <a href="https://dl.suckles
<p>Take a peek. You’ll see a bunch of <code>.c</code> files, a <code>Makefile</code>, and the golden goose: <strong>config.def.h</strong>.</p>
<h2 id="the-infamous-">The Infamous <code>config.h</code></h2>
<p>This is where the magic happens, folks. <code>config.def.h</code> is the <em>default</em> configuration. You’re not supposed to edit this directly. Instead, you copy it to <code>config.h</code>:</p>
-<pre><code class="language-bash"> $ cp config.def.h config.h
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ cp config.def.h config.h |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>Now, config.h is <strong>your</strong> personal configuration file. Open it up with your favorite text editor. You’ll see C arrays defining your keys, your tags, your fonts, your colors.
It might look a bit intimidating at first, but it’s surprisingly straightforward.</p>
@@ -110,28 +124,36 @@ It might look a bit intimidating at first, but it’s surprisingly straightf
<p>Still in your dwm directory? Good. Time to compile!
This is the part that sounds scary but is usually super simple thanks to the Makefile.</p>
<p>To compile and install it system-wide:</p>
-<pre><code class="language-bash"> $ sudo make clean install
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo make clean install |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>Or, if you prefer not to install it system-wide immediately yet (which is a good idea for testing):</p>
-<pre><code class="language-bash"> $ make
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ make |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>If all your prerequisites were met, this should complete without errors. You’ll now have a dwm executable file in the directory (and runnable in your terminal if
you ran the system wide installation)!</p>
<p>To run dwm, you’ll typically need to configure your .xinitrc file to launch it.
For example, you could add this line to your ~/.xinitrc:</p>
-<pre><code class="language-bash"> exec dwm
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| exec dwm |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>For the people who run a Display Manager which is more likely (i.e gdm, sddm, lightdm, etc.). You’ll need to create a .desktop file.
This file basically has the information and stuff for the thing to see and run it. You’ll need to create one in the /usr/share/xsessions/.
And here’s an example <strong>dwm.desktop</strong> for reference:</p>
<p>/usr/share/xsessions/dwm.desktop:</p>
-<pre><code>[Desktop Entry]
-Encoding=UTF-8
-Name=dwm
-Comment=Dynamic window manager
-Exec=dwm
-Icon=dwm
-Type=XSession
+<pre><code class="language-bash">┌────────────────────────────────────┐
+| [Destop Entry] |
+| Encoding=UTF-8 |
+| Name=dwm |
+| Comment=Dynamic window manager |
+| Exec=dwm |
+| Icon=dwm |
+| Type=XSession |
+└────────────────────────────────────┘
</code></pre>
<p>The default keybinding for the Terminal is <em>Alt+Shift+Return</em>. Any other keybindings can be found in config.h, it shouldn’t be hard to
understand the giant struct declaration. Comments left by the suckless team are your friends! Read them!</p>
@@ -157,9 +179,11 @@ package manager. Once you’ve done that here are the general steps:</p>
<li><p>Find a Patch: Head over to the dwm patches page. Find a patch you like. Let’s say you want the autostart patch,
which allows you to run commands automatically when dwm starts (I highly reccomend this especially if you’re running from a display manager!).</p></li>
<li><p>Download the Patch: Download the .diff file for the patch. Save it somewhere, perhaps in a patches subdirectory within your dwm source folder.</p></li>
-<li><p>Apply the Patch: In your dwm source directory, use the patch command:</p></li>
+<li><p>Apply the Patch: In your dwm source directory, use the patch command: </p></li>
</ol>
-<pre><code class="language-bash"> patch -Np1 -i patchfile.diff
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ patch -Np1 -i /path/to/patchfile.diff |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<ol start="4">
<li><p>Resolve Conflicts (If Any): Sometimes, patches might conflict, especially if they modify the same lines of code or if you’re applying a patch meant
@@ -167,7 +191,9 @@ for an older version of dwm. This will result in .rej (rejected) files. You̵
at the .rej files to see what couldn’t be applied. This is the trickiest part, but it gets easier with practice. Start with simple, popular patches.</p></li>
<li><p>Recompile: After applying a patch (and resolving any conflicts), you need to recompile!</p></li>
</ol>
-<pre><code class="language-bash"> $ sudo make clean install
+<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
+| $ sudo make clean install |
+└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>
<p>And that’s the patching dance! It can be a bit fiddly, especially when patches conflict, but it gives you incredible control over your window manager.
Also, a quick note! Some patches might change the config.def.h, add these new changes to your config.h since they are default configs for the new patches.</p>