mirror of
https://github.com/cowmonk/cowmonk.github.io.git
synced 2025-10-27 14:43:26 +00:00
Code blocks look better
This commit is contained in:
parent
e72fd7d4b2
commit
d04a72d219
2 changed files with 92 additions and 40 deletions
66
atom.xml
66
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>
|
<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"> $ sudo apt install build-essential
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ sudo apt install build-essential |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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"> $ sudo pacman -S base-devel
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ sudo pacman -S base-devel |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>And for Fedora folks:</p>
|
<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>
|
</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"> $ 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>
|
</code></pre>
|
||||||
<p>Arch:</p>
|
<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>
|
</code></pre>
|
||||||
<p>Fedora:</p>
|
<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>
|
</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>
|
||||||
|
|
@ -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>
|
<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"> $ cp config.def.h config.h
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ cp config.def.h config.h |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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>
|
||||||
|
|
@ -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!
|
<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"> $ sudo make clean install
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ sudo make clean install |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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"> $ make
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ make |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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"> exec dwm
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| exec dwm |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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>[Desktop Entry]
|
<pre><code class="language-bash">┌────────────────────────────────────┐
|
||||||
Encoding=UTF-8
|
| [Destop Entry] |
|
||||||
Name=dwm
|
| Encoding=UTF-8 |
|
||||||
Comment=Dynamic window manager
|
| Name=dwm |
|
||||||
Exec=dwm
|
| Comment=Dynamic window manager |
|
||||||
Icon=dwm
|
| Exec=dwm |
|
||||||
Type=XSession
|
| Icon=dwm |
|
||||||
|
| Type=XSession |
|
||||||
|
└────────────────────────────────────┘
|
||||||
</code></pre>
|
</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
|
<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>
|
||||||
|
|
@ -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,
|
<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>
|
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>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"> patch -Np1 -i patchfile.diff
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ patch -Np1 -i /path/to/patchfile.diff |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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
|
||||||
|
|
@ -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>
|
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"> $ sudo make clean install
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ sudo make clean install |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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>
|
||||||
|
|
|
||||||
66
blog4.html
66
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>
|
<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"> $ sudo apt install build-essential
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ sudo apt install build-essential |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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"> $ sudo pacman -S base-devel
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ sudo pacman -S base-devel |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>And for Fedora folks:</p>
|
<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>
|
</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"> $ 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>
|
</code></pre>
|
||||||
<p>Arch:</p>
|
<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>
|
</code></pre>
|
||||||
<p>Fedora:</p>
|
<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>
|
</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>
|
||||||
|
|
@ -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>
|
<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"> $ cp config.def.h config.h
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ cp config.def.h config.h |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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>
|
||||||
|
|
@ -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!
|
<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"> $ sudo make clean install
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ sudo make clean install |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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"> $ make
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ make |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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"> exec dwm
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| exec dwm |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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>[Desktop Entry]
|
<pre><code class="language-bash">┌────────────────────────────────────┐
|
||||||
Encoding=UTF-8
|
| [Destop Entry] |
|
||||||
Name=dwm
|
| Encoding=UTF-8 |
|
||||||
Comment=Dynamic window manager
|
| Name=dwm |
|
||||||
Exec=dwm
|
| Comment=Dynamic window manager |
|
||||||
Icon=dwm
|
| Exec=dwm |
|
||||||
Type=XSession
|
| Icon=dwm |
|
||||||
|
| Type=XSession |
|
||||||
|
└────────────────────────────────────┘
|
||||||
</code></pre>
|
</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
|
<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>
|
||||||
|
|
@ -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,
|
<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>
|
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>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"> patch -Np1 -i patchfile.diff
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ patch -Np1 -i /path/to/patchfile.diff |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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
|
||||||
|
|
@ -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>
|
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"> $ sudo make clean install
|
<pre><code class="language-bash">┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
| $ sudo make clean install |
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
</code></pre>
|
</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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue