diff options
Diffstat (limited to '_site')
| -rw-r--r-- | _site/archive/index.html | 13 | ||||
| -rw-r--r-- | _site/archive/suckless-software/index.html | 142 | ||||
| -rw-r--r-- | _site/feed.xml | 2 | ||||
| -rw-r--r-- | _site/index.html | 13 | ||||
| -rw-r--r-- | _site/posts.xml | 2 | ||||
| -rw-r--r-- | _site/sitemap.xml | 4 |
6 files changed, 174 insertions, 2 deletions
diff --git a/_site/archive/index.html b/_site/archive/index.html index b54cbf2..821ba88 100644 --- a/_site/archive/index.html +++ b/_site/archive/index.html @@ -46,6 +46,19 @@ <tr> <td class="posts-td posts-td-link"> + <a href="/archive/suckless-software/" class="link-decor-none">Suckless software</a> + </td> + <td class="posts-td posts-td-time"> + <span class="post-meta"> + <time datetime="2025-11-30 00:00:00 +0800">2025-11-30</time> + </span> + </td> + </tr> + + + + <tr> + <td class="posts-td posts-td-link"> <a href="/archive/neo4j-a-star-search/" class="link-decor-none">Neo4J A* search</a> </td> <td class="posts-td posts-td-time"> 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> diff --git a/_site/feed.xml b/_site/feed.xml index b997599..d9dd688 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-11-28T20:49:25+08:00</updated><id>/feed.xml</id><title type="html">ASCIIMX | Archive</title><author><name>Wickramage Don Sadeep Madurange</name></author><entry><title type="html">Neo4J A* search</title><link href="/archive/neo4j-a-star-search/" rel="alternate" type="text/html" title="Neo4J A* search" /><published>2025-09-14T00:00:00+08:00</published><updated>2025-09-14T00:00:00+08:00</updated><id>/archive/neo4j-a-star-search</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Back in 2018, we used Neo4J graph database to track the movement of marine vessels. We were interested in the shortest path a ship could take through a network of about 13,000 route points. Algorithms based on graph theory, such as A* search, provide an optimal solution to this problem. Therefore, it was useful to model the set of route points as a graph.]]></summary></entry><entry><title type="html">MOSFETs</title><link href="/archive/mosfet-switches/" rel="alternate" type="text/html" title="MOSFETs" /><published>2025-06-22T00:00:00+08:00</published><updated>2025-06-22T00:00:00+08:00</updated><id>/archive/mosfet-switches</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Recently, I needed a low-power circuit for one of my battery-operated projects. Much of the system’s power savings depended on its ability to electronically switch off components, such as servos, that draw high levels of quiescent currents. My search for a solution led me to MOSFETs, transistors capable of controlling circuits operating at voltages far above their own.]]></summary></entry><entry><title type="html">ATmega328P chips</title><link href="/archive/arduino-uno/" rel="alternate" type="text/html" title="ATmega328P chips" /><published>2025-04-10T00:00:00+08:00</published><updated>2025-04-10T00:00:00+08:00</updated><id>/archive/arduino-uno</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This is a quick reference for wiring up ATmega328P ICs to run at 5V and 3.3V. While the 5V configuration is common, the 3.3V configuration can be useful in low-power applications and when interfacing with parts that themselves run at 3.3V. In this guide, the 5V setup is configured with a 16MHz crystal oscillator, while the 3.3V configuration makes use of an 8MHz crystal oscillator.]]></summary></entry><entry><title type="html">Bare-metal ATSAM3X8E chips</title><link href="/archive/arduino-due/" rel="alternate" type="text/html" title="Bare-metal ATSAM3X8E chips" /><published>2024-10-05T00:00:00+08:00</published><updated>2024-10-05T00:00:00+08:00</updated><id>/archive/arduino-due</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This article is a step-by-step guide for programming bare-metal ATSAM3X8E chips found on Arduino Due boards. It also includes notes on the chip’s memory layout relevant for writing linker scripts. The steps described in this article were tested on an OpenBSD workstation.]]></summary></entry></feed>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-11-30T11:48:35+08:00</updated><id>/feed.xml</id><title type="html">ASCIIMX | Archive</title><author><name>Wickramage Don Sadeep Madurange</name></author><entry><title type="html">Suckless software</title><link href="/archive/suckless-software/" rel="alternate" type="text/html" title="Suckless software" /><published>2025-11-30T00:00:00+08:00</published><updated>2025-11-30T00:00:00+08:00</updated><id>/archive/suckless-software</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Since suckless 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.]]></summary></entry><entry><title type="html">Neo4J A* search</title><link href="/archive/neo4j-a-star-search/" rel="alternate" type="text/html" title="Neo4J A* search" /><published>2025-09-14T00:00:00+08:00</published><updated>2025-09-14T00:00:00+08:00</updated><id>/archive/neo4j-a-star-search</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Back in 2018, we used Neo4J graph database to track the movement of marine vessels. We were interested in the shortest path a ship could take through a network of about 13,000 route points. Algorithms based on graph theory, such as A* search, provide an optimal solution to this problem. Therefore, it was useful to model the set of route points as a graph.]]></summary></entry><entry><title type="html">MOSFETs</title><link href="/archive/mosfet-switches/" rel="alternate" type="text/html" title="MOSFETs" /><published>2025-06-22T00:00:00+08:00</published><updated>2025-06-22T00:00:00+08:00</updated><id>/archive/mosfet-switches</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[Recently, I needed a low-power circuit for one of my battery-operated projects. Much of the system’s power savings depended on its ability to electronically switch off components, such as servos, that draw high levels of quiescent currents. My search for a solution led me to MOSFETs, transistors capable of controlling circuits operating at voltages far above their own.]]></summary></entry><entry><title type="html">ATmega328P chips</title><link href="/archive/arduino-uno/" rel="alternate" type="text/html" title="ATmega328P chips" /><published>2025-04-10T00:00:00+08:00</published><updated>2025-04-10T00:00:00+08:00</updated><id>/archive/arduino-uno</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This is a quick reference for wiring up ATmega328P ICs to run at 5V and 3.3V. While the 5V configuration is common, the 3.3V configuration can be useful in low-power applications and when interfacing with parts that themselves run at 3.3V. In this guide, the 5V setup is configured with a 16MHz crystal oscillator, while the 3.3V configuration makes use of an 8MHz crystal oscillator.]]></summary></entry><entry><title type="html">Bare-metal ATSAM3X8E chips</title><link href="/archive/arduino-due/" rel="alternate" type="text/html" title="Bare-metal ATSAM3X8E chips" /><published>2024-10-05T00:00:00+08:00</published><updated>2024-10-05T00:00:00+08:00</updated><id>/archive/arduino-due</id><author><name>Wickramage Don Sadeep Madurange</name></author><summary type="html"><![CDATA[This article is a step-by-step guide for programming bare-metal ATSAM3X8E chips found on Arduino Due boards. It also includes notes on the chip’s memory layout relevant for writing linker scripts. The steps described in this article were tested on an OpenBSD workstation.]]></summary></entry></feed>
\ No newline at end of file diff --git a/_site/index.html b/_site/index.html index 4ebebc8..4cb6a06 100644 --- a/_site/index.html +++ b/_site/index.html @@ -56,6 +56,19 @@ <tr> <td class="posts-td posts-td-link"> + <a href="/archive/suckless-software/" class="link-decor-none">Suckless software</a> + </td> + <td class="posts-td posts-td-time"> + <span class="post-meta"> + <time datetime="2025-11-30 00:00:00 +0800">2025-11-30</time> + </span> + </td> + </tr> + + + + <tr> + <td class="posts-td posts-td-link"> <a href="/archive/neo4j-a-star-search/" class="link-decor-none">Neo4J A* search</a> </td> <td class="posts-td posts-td-time"> diff --git a/_site/posts.xml b/_site/posts.xml index 8794142..12ca3c1 100644 --- a/_site/posts.xml +++ b/_site/posts.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/posts.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-11-28T20:49:25+08:00</updated><id>/posts.xml</id><title type="html">ASCIIMX</title><author><name>Wickramage Don Sadeep Madurange</name></author></feed>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/posts.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-11-30T11:48:35+08:00</updated><id>/posts.xml</id><title type="html">ASCIIMX</title><author><name>Wickramage Don Sadeep Madurange</name></author></feed>
\ No newline at end of file diff --git a/_site/sitemap.xml b/_site/sitemap.xml index 6f12ff3..669f6b7 100644 --- a/_site/sitemap.xml +++ b/_site/sitemap.xml @@ -17,6 +17,10 @@ <lastmod>2025-09-14T00:00:00+08:00</lastmod> </url> <url> +<loc>/archive/suckless-software/</loc> +<lastmod>2025-11-30T00:00:00+08:00</lastmod> +</url> +<url> <loc>/projects/e-reader/</loc> <lastmod>2023-10-24T00:00:00+08:00</lastmod> </url> |
