mirror of
https://github.com/cowmonk/cowmonk.github.io.git
synced 2025-10-27 14:43:26 +00:00
update and improve website look
This commit is contained in:
parent
d04a72d219
commit
e9587d39a3
3 changed files with 120 additions and 124 deletions
112
atom.xml
112
atom.xml
|
|
@ -43,39 +43,33 @@ 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>
|
<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>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>
|
<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">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo apt install build-essential |
|
<pre><code class="language-bash">$ sudo apt install build-essential</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>For Arch users (for the “I use Arch btw” furries):</p>
|
<p>For Arch users (for the “I use Arch btw” furries):</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo pacman -S base-devel |
|
<pre><code class="language-bash">$ sudo pacman -S base-devel</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>And for Fedora folks:</p>
|
<p>And for Fedora folks:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo dnf group install "Development Tools" "Development Libraries" |
|
<pre><code class="language-bash">$ sudo dnf group install "Development Tools" "Development Libraries"</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<h1 id="make"><strong>Make:</strong></h1>
|
<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>
|
<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>
|
<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>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>
|
<p>Debian:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ 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>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>Arch:</p>
|
<p>Arch:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo pacman -S libx11 libxft libxinerama |
|
<pre><code class="language-bash">$ sudo pacman -S libx11 libxft libxinerama</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>Fedora:</p>
|
<p>Fedora:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ 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>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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><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>
|
<p>Got all that? Sweet!</p>
|
||||||
<h2 id="getting-the-goods-the-source-code">Getting the Goods (The Source Code!)</h2>
|
<h2 id="getting-the-goods-the-source-code">Getting the Goods (The Source Code!)</h2>
|
||||||
|
|
@ -91,10 +85,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>
|
<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>
|
<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>
|
<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">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ cp config.def.h config.h |
|
<pre><code class="language-bash">$ cp config.def.h config.h</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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.
|
<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>
|
It might look a bit intimidating at first, but it’s surprisingly straightforward.</p>
|
||||||
<p>For now, don’t change anything. Let’s just get it built!</p>
|
<p>For now, don’t change anything. Let’s just get it built!</p>
|
||||||
|
|
@ -102,37 +95,34 @@ It might look a bit intimidating at first, but it’s surprisingly straightf
|
||||||
<p>Still in your dwm directory? Good. Time to compile!
|
<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>
|
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>
|
<p>To compile and install it system-wide:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo make clean install |
|
<pre><code class="language-bash">$ sudo make clean install</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>Or, if you prefer not to install it system-wide immediately yet (which is a good idea for testing):</p>
|
<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">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ make |
|
<pre><code class="language-bash">$ make</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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
|
<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>
|
you ran the system wide installation)!</p>
|
||||||
<p>To run dwm, you’ll typically need to configure your .xinitrc file to launch it.
|
<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>
|
For example, you could add this line to your ~/.xinitrc:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| exec dwm |
|
<pre><code class="language-bash">exec dwm</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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.
|
<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/.
|
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>
|
And here’s an example <strong>dwm.desktop</strong> for reference:</p>
|
||||||
<p>/usr/share/xsessions/dwm.desktop:</p>
|
<p>/usr/share/xsessions/dwm.desktop:</p>
|
||||||
<pre><code class="language-bash">┌────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| [Destop Entry] |
|
<pre><code class="language-bash">[Destop Entry]
|
||||||
| Encoding=UTF-8 |
|
Encoding=UTF-8
|
||||||
| Name=dwm |
|
Name=dwm
|
||||||
| Comment=Dynamic window manager |
|
Comment=Dynamic window manager
|
||||||
| Exec=dwm |
|
Exec=dwm
|
||||||
| Icon=dwm |
|
Icon=dwm
|
||||||
| Type=XSession |
|
Type=XSession
|
||||||
└────────────────────────────────────┘
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
</div>
|
||||||
<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
|
<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>
|
understand the giant struct declaration. Comments left by the suckless team are your friends! Read them!</p>
|
||||||
<h2 id="uh-oh-its-plain-time-for-patches">Uh Oh, It’s Plain! Time for Patches!</h2>
|
<h2 id="uh-oh-its-plain-time-for-patches">Uh Oh, It’s Plain! Time for Patches!</h2>
|
||||||
|
|
@ -140,11 +130,11 @@ understand the giant struct declaration. Comments left by the suckless team are
|
||||||
<p>Aha! You’ve stumbled upon the next layer of the suckless philosophy: patching.</p>
|
<p>Aha! You’ve stumbled upon the next layer of the suckless philosophy: patching.</p>
|
||||||
<p>Instead of bloating the core dwm code with every feature under the sun, the suckless community maintains a collection of <a href="https://dwm.suckless.org/patches/">patches</a>.
|
<p>Instead of bloating the core dwm code with every feature under the sun, the suckless community maintains a collection of <a href="https://dwm.suckless.org/patches/">patches</a>.
|
||||||
These are .diff files that you apply to your source code to add specific functionalities.</p>
|
These are .diff files that you apply to your source code to add specific functionalities.</p>
|
||||||
<pre><code class="language-bash"> Want gaps between windows? There's a patch for that.
|
<p> Want gaps between windows? There's a patch for that.<br/>
|
||||||
Want clickable status bar elements? Patch!
|
Want clickable status bar elements? Patch!<br/>
|
||||||
Want windows to swallow terminals? Patch!
|
Want windows to swallow terminals? Patch!<br/>
|
||||||
Want your bar at the bottom? You guessed it, patch!
|
Want your bar at the bottom? You guessed it, patch!<br/>
|
||||||
</code></pre>
|
</p>
|
||||||
<p>This is where the “do it yourself” ethos really shines. You pick and choose exactly what you want. However it might be daunting for some people.
|
<p>This is where the “do it yourself” ethos really shines. You pick and choose exactly what you want. However it might be daunting for some people.
|
||||||
And unfortunately, many patches don’t really like to work together. If you want a nice dwm patching experience, I would use <a href="https://github.com/bakkeby/dwm-flexipatch">this one</a>,
|
And unfortunately, many patches don’t really like to work together. If you want a nice dwm patching experience, I would use <a href="https://github.com/bakkeby/dwm-flexipatch">this one</a>,
|
||||||
he’s the same creator as <a href="https://github.com/bakkeby/st-flexipatch">st-flexipatch</a> and other “flexipatch” series. Basically, all you do is edit the <strong>patches.h</strong> file
|
he’s the same creator as <a href="https://github.com/bakkeby/st-flexipatch">st-flexipatch</a> and other “flexipatch” series. Basically, all you do is edit the <strong>patches.h</strong> file
|
||||||
|
|
@ -159,20 +149,18 @@ which allows you to run commands automatically when dwm starts (I highly reccome
|
||||||
<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>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>
|
</ol>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ patch -Np1 -i /path/to/patchfile.diff |
|
<pre><code class="language-bash">$ patch -Np1 -i /path/to/patchfile.diff</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<ol start="4">
|
<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
|
<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
|
||||||
for an older version of dwm. This will result in .rej (rejected) files. You’ll need to manually edit the source files to resolve these conflicts, looking
|
for an older version of dwm. This will result in .rej (rejected) files. You’ll need to manually edit the source files to resolve these conflicts, looking
|
||||||
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>
|
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>
|
<li><p>Recompile: After applying a patch (and resolving any conflicts), you need to recompile!</p></li>
|
||||||
</ol>
|
</ol>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo make clean install |
|
<pre><code class="language-bash">$ sudo make clean install</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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.
|
<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>
|
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>
|
||||||
<h2 id="next-steps-the-suckless-mentality">Next Steps & The Suckless Mentality</h2>
|
<h2 id="next-steps-the-suckless-mentality">Next Steps & The Suckless Mentality</h2>
|
||||||
|
|
|
||||||
112
blog4.html
112
blog4.html
|
|
@ -65,39 +65,33 @@ 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>
|
<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>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>
|
<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">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo apt install build-essential |
|
<pre><code class="language-bash">$ sudo apt install build-essential</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>For Arch users (for the “I use Arch btw” furries):</p>
|
<p>For Arch users (for the “I use Arch btw” furries):</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo pacman -S base-devel |
|
<pre><code class="language-bash">$ sudo pacman -S base-devel</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>And for Fedora folks:</p>
|
<p>And for Fedora folks:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo dnf group install "Development Tools" "Development Libraries" |
|
<pre><code class="language-bash">$ sudo dnf group install "Development Tools" "Development Libraries"</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<h1 id="make"><strong>Make:</strong></h1>
|
<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>
|
<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>
|
<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>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>
|
<p>Debian:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ 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>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>Arch:</p>
|
<p>Arch:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo pacman -S libx11 libxft libxinerama |
|
<pre><code class="language-bash">$ sudo pacman -S libx11 libxft libxinerama</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>Fedora:</p>
|
<p>Fedora:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ 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>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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><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>
|
<p>Got all that? Sweet!</p>
|
||||||
<h2 id="getting-the-goods-the-source-code">Getting the Goods (The Source Code!)</h2>
|
<h2 id="getting-the-goods-the-source-code">Getting the Goods (The Source Code!)</h2>
|
||||||
|
|
@ -113,10 +107,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>
|
<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>
|
<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>
|
<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">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ cp config.def.h config.h |
|
<pre><code class="language-bash">$ cp config.def.h config.h</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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.
|
<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>
|
It might look a bit intimidating at first, but it’s surprisingly straightforward.</p>
|
||||||
<p>For now, don’t change anything. Let’s just get it built!</p>
|
<p>For now, don’t change anything. Let’s just get it built!</p>
|
||||||
|
|
@ -124,37 +117,34 @@ It might look a bit intimidating at first, but it’s surprisingly straightf
|
||||||
<p>Still in your dwm directory? Good. Time to compile!
|
<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>
|
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>
|
<p>To compile and install it system-wide:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo make clean install |
|
<pre><code class="language-bash">$ sudo make clean install</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<p>Or, if you prefer not to install it system-wide immediately yet (which is a good idea for testing):</p>
|
<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">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ make |
|
<pre><code class="language-bash">$ make</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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
|
<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>
|
you ran the system wide installation)!</p>
|
||||||
<p>To run dwm, you’ll typically need to configure your .xinitrc file to launch it.
|
<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>
|
For example, you could add this line to your ~/.xinitrc:</p>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| exec dwm |
|
<pre><code class="language-bash">exec dwm</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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.
|
<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/.
|
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>
|
And here’s an example <strong>dwm.desktop</strong> for reference:</p>
|
||||||
<p>/usr/share/xsessions/dwm.desktop:</p>
|
<p>/usr/share/xsessions/dwm.desktop:</p>
|
||||||
<pre><code class="language-bash">┌────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| [Destop Entry] |
|
<pre><code class="language-bash">[Destop Entry]
|
||||||
| Encoding=UTF-8 |
|
Encoding=UTF-8
|
||||||
| Name=dwm |
|
Name=dwm
|
||||||
| Comment=Dynamic window manager |
|
Comment=Dynamic window manager
|
||||||
| Exec=dwm |
|
Exec=dwm
|
||||||
| Icon=dwm |
|
Icon=dwm
|
||||||
| Type=XSession |
|
Type=XSession
|
||||||
└────────────────────────────────────┘
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
</div>
|
||||||
<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
|
<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>
|
understand the giant struct declaration. Comments left by the suckless team are your friends! Read them!</p>
|
||||||
<h2 id="uh-oh-its-plain-time-for-patches">Uh Oh, It’s Plain! Time for Patches!</h2>
|
<h2 id="uh-oh-its-plain-time-for-patches">Uh Oh, It’s Plain! Time for Patches!</h2>
|
||||||
|
|
@ -162,11 +152,11 @@ understand the giant struct declaration. Comments left by the suckless team are
|
||||||
<p>Aha! You’ve stumbled upon the next layer of the suckless philosophy: patching.</p>
|
<p>Aha! You’ve stumbled upon the next layer of the suckless philosophy: patching.</p>
|
||||||
<p>Instead of bloating the core dwm code with every feature under the sun, the suckless community maintains a collection of <a href="https://dwm.suckless.org/patches/">patches</a>.
|
<p>Instead of bloating the core dwm code with every feature under the sun, the suckless community maintains a collection of <a href="https://dwm.suckless.org/patches/">patches</a>.
|
||||||
These are .diff files that you apply to your source code to add specific functionalities.</p>
|
These are .diff files that you apply to your source code to add specific functionalities.</p>
|
||||||
<pre><code class="language-bash"> Want gaps between windows? There's a patch for that.
|
<p style="margin: 0 auto; text-align: left; padding: 1em;"> Want gaps between windows? There's a patch for that.<br/>
|
||||||
Want clickable status bar elements? Patch!
|
Want clickable status bar elements? Patch!<br/>
|
||||||
Want windows to swallow terminals? Patch!
|
Want windows to swallow terminals? Patch!<br/>
|
||||||
Want your bar at the bottom? You guessed it, patch!
|
Want your bar at the bottom? You guessed it, patch!<br/>
|
||||||
</code></pre>
|
</p>
|
||||||
<p>This is where the “do it yourself” ethos really shines. You pick and choose exactly what you want. However it might be daunting for some people.
|
<p>This is where the “do it yourself” ethos really shines. You pick and choose exactly what you want. However it might be daunting for some people.
|
||||||
And unfortunately, many patches don’t really like to work together. If you want a nice dwm patching experience, I would use <a href="https://github.com/bakkeby/dwm-flexipatch">this one</a>,
|
And unfortunately, many patches don’t really like to work together. If you want a nice dwm patching experience, I would use <a href="https://github.com/bakkeby/dwm-flexipatch">this one</a>,
|
||||||
he’s the same creator as <a href="https://github.com/bakkeby/st-flexipatch">st-flexipatch</a> and other “flexipatch” series. Basically, all you do is edit the <strong>patches.h</strong> file
|
he’s the same creator as <a href="https://github.com/bakkeby/st-flexipatch">st-flexipatch</a> and other “flexipatch” series. Basically, all you do is edit the <strong>patches.h</strong> file
|
||||||
|
|
@ -181,20 +171,18 @@ which allows you to run commands automatically when dwm starts (I highly reccome
|
||||||
<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>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>
|
</ol>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ patch -Np1 -i /path/to/patchfile.diff |
|
<pre><code class="language-bash">$ patch -Np1 -i /path/to/patchfile.diff</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</code></pre>
|
|
||||||
<ol start="4">
|
<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
|
<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
|
||||||
for an older version of dwm. This will result in .rej (rejected) files. You’ll need to manually edit the source files to resolve these conflicts, looking
|
for an older version of dwm. This will result in .rej (rejected) files. You’ll need to manually edit the source files to resolve these conflicts, looking
|
||||||
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>
|
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>
|
<li><p>Recompile: After applying a patch (and resolving any conflicts), you need to recompile!</p></li>
|
||||||
</ol>
|
</ol>
|
||||||
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
<div class="terminal-output">
|
||||||
| $ sudo make clean install |
|
<pre><code class="language-bash">$ sudo make clean install</code></pre>
|
||||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
</div>
|
||||||
</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.
|
<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>
|
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>
|
||||||
<h2 id="next-steps-the-suckless-mentality">Next Steps & The Suckless Mentality</h2>
|
<h2 id="next-steps-the-suckless-mentality">Next Steps & The Suckless Mentality</h2>
|
||||||
|
|
|
||||||
20
template.css
20
template.css
|
|
@ -33,3 +33,23 @@ section > p time,
|
||||||
article { color: #fff; }
|
article { color: #fff; }
|
||||||
article > header { display: none; }
|
article > header { display: none; }
|
||||||
footer { color: #aaa; }
|
footer { color: #aaa; }
|
||||||
|
|
||||||
|
.terminal-output {
|
||||||
|
background-color: #111;
|
||||||
|
color: #e0e0e0;
|
||||||
|
border: 2px solid #888;
|
||||||
|
padding: 1em;
|
||||||
|
margin: 1.4em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-output pre {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: pre;
|
||||||
|
background-color: transparent;
|
||||||
|
color: inherit;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 0.95em;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue