diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-11-29 22:00:01 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-11-30 11:48:55 +0800 |
| commit | 9136401f6975119af5d37f13b20cd92937b06118 (patch) | |
| tree | 0a832c676bf47354d4bc6d322214c78f590bcd12 /_site/archive/suckless-software/index.html | |
| parent | b1a2cc66bb29a04ca61d09c65355bcd18efad2d9 (diff) | |
| download | www-9136401f6975119af5d37f13b20cd92937b06118.tar.gz | |
Suckless software.
Diffstat (limited to '_site/archive/suckless-software/index.html')
| -rw-r--r-- | _site/archive/suckless-software/index.html | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/_site/archive/suckless-software/index.html b/_site/archive/suckless-software/index.html new file mode 100644 index 0000000..e19125b --- /dev/null +++ b/_site/archive/suckless-software/index.html @@ -0,0 +1,142 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Suckless software</title> + + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Suckless software</title> + <link rel="stylesheet" href="/assets/css/main.css"> + <link rel="stylesheet" href="/assets/css/skeleton.css"> +</head> + + + + </head> + <body> + + <div class="container"> + <ul id="navlist" class="left"> + + <li > + <a href="/" class="link-decor-none">hme</a> + </li> + <li class="active"> + <a href="/archive/" class="link-decor-none">blg</a> + </li> + <li > + <a href="/projects/" class="link-decor-none">poc</a> + </li> + <li > + <a href="/about/" class="link-decor-none">abt</a> + </li> + <li><a href="/feed.xml" class="link-decor-none">rss</a></li> + </ul> +</div> + + + + <main> + <div class="container"> + <h2 class="center" id="title">SUCKLESS SOFTWARE</h2> + <h6 class="center">30 NOVEMBER 2025</h5> + <br> + <div class="twocol justify"><p>Since <a href="https://suckless.org/" class="external" target="_blank" rel="noopener noreferrer">suckless</a> software requires users to modify the +source code and recompile to customize, I need a way to maintain patches over +the long term while retaining the ability to upgrade the software as new +versions are released.</p> + +<h2 id="initial-setup">Initial setup</h2> + +<p>When using a suckless program, I usually begin by cloning the project and +setting the remote URL to push a copy of the source code with my patches to my +own git repository:</p> + +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone git://git.suckless.org/dwm +git reset --hard <tag> +git remote set-url --push origin git@git.asciimx.com:/repos/dwm +</code></pre></div></div> + +<p>This way, I can pull updates from the upstream project whenever I want, while +committing my changes to my own git repository. The git reset command aligns my +branch head with a stable release before applying patches or installing the +software.</p> + +<p>If all I want to do is reconfigure the software (e.g., change key bindings), +which is what I need most of the time, the recommended approach is to modify +the config.h file. If the config.h isn’t yet in the project, the following +command generates it from the defaults and compiles the software:</p> + +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>make clean <target> +</code></pre></div></div> + +<p>Where <code class="language-plaintext highlighter-rouge"><target></code> is the name of the application (e.g., dwm) found in the +Makefile. I modify the resulting config.h file and run <code class="language-plaintext highlighter-rouge">make clean install</code> to +install the software before committing and pushing my changes to my git repo.</p> + +<h2 id="dwm-and-slstatus">dwm and slstatus</h2> + +<p>Since dwm and slstatus are always running, <code class="language-plaintext highlighter-rouge">make install</code> will likely fail for +them. The operating system will prevent the installer from replacing running +executables with new ones. Hence, we must first stop the running instances of +these programs:</p> + +<ol> + <li>Quit the window manager: <code class="language-plaintext highlighter-rouge">Mod + Shift + q</code> (or if you have modified the +command, use that instead).</li> + <li>Switch to tty: <code class="language-plaintext highlighter-rouge">Ctrl + Alt + F1</code>.</li> + <li>Log in and change the directory to where dwm/slstatus is.</li> + <li>Run <code class="language-plaintext highlighter-rouge">make install</code> to install the software.</li> + <li>Switch back to the graphical session: <code class="language-plaintext highlighter-rouge">Ctrl + Alt + F5</code>.</li> + <li>Verify installation: <code class="language-plaintext highlighter-rouge">dwm -v</code>/<code class="language-plaintext highlighter-rouge">slstatus -v</code>.</li> + <li>Commit changes to git and push.</li> +</ol> + +<p>The key combinations for switching to the tty and back may differ across +systems. The ones listed above are for OpenBSD.</p> + +<h2 id="subsequent-upgrades">Subsequent upgrades</h2> + +<p>When suckless releases a new version, I run <code class="language-plaintext highlighter-rouge">git pull --rebase</code> to fetch the +upstream changes and rebase my patches on top of them. Because I tend to use +stable versions, I perform another interactive rebase to drop the commits +between the latest stable version tag and my patch before installing the +software.</p> + +<p>Commit log before upgrading:</p> + +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dt236 My patch. +3fkdf Version 6.5. +</code></pre></div></div> + +<p>Commit log after pulling:</p> + +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>w467d My patch. +gh25g A commit. +g525g Another commit. +3fkdf Version 6.6. +vd425 Old commit. +q12vu Another old commit. +3fkdf Version 6.5. +</code></pre></div></div> + +<p>Commit log after the interactive rebase:</p> + +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>h57jh My patch. +3fkdf Version 6.6. +vd425 Old commit. +q12vu Another old commit. +3fkdf Version 6.5. +</code></pre></div></div> + +<p>And finally, commit and push all the changes to my own git repository.</p> + +</div> + <p class="post-author right">by Wickramage Don Sadeep Madurange</p> + </div> + </main> + + </body> +</html> |
