<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://jsf9k.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://jsf9k.github.io/" rel="alternate" type="text/html" /><updated>2026-07-27T11:38:53-04:00</updated><id>https://jsf9k.github.io/feed.xml</id><title type="html">Dispatches From the Abyss</title><subtitle>Random thoughts of a software engineer.</subtitle><entry><title type="html">Multilingual Keyboard Support in X</title><link href="https://jsf9k.github.io/tools/2023/02/15/multilingual-support-in-x.html" rel="alternate" type="text/html" title="Multilingual Keyboard Support in X" /><published>2023-02-15T14:43:24-05:00</published><updated>2023-02-15T14:43:24-05:00</updated><id>https://jsf9k.github.io/tools/2023/02/15/multilingual-support-in-x</id><content type="html" xml:base="https://jsf9k.github.io/tools/2023/02/15/multilingual-support-in-x.html"><![CDATA[<p>I occasionally need support for accented characters in X so that I can
type documents in Esperanto, Latin, French, or German.  Such support
is actually quite easy to configure for X with modern Linux systems.</p>

<p>There are two different low-level tools that you can use to configure
keyboard support in X.  The older tool is called
<a href="https://wiki.archlinux.org/title/xmodmap"><code class="language-plaintext highlighter-rouge">xmodmap</code></a> and the newer
tool is called
<a href="https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Using_setxkbmap"><code class="language-plaintext highlighter-rouge">setxkbmap</code></a>.
My experience is that <code class="language-plaintext highlighter-rouge">setxkbmap</code> has less of a learning curve and is
far easier to use, as long as it supports what you want to do.  It’s
what I currently use.</p>

<p>The best way to make use of <code class="language-plaintext highlighter-rouge">setxkbmap</code> is via the
<a href="https://man.archlinux.org/man/localectl.1.en"><code class="language-plaintext highlighter-rouge">localectl</code></a> command
from SystemD.  For instance, I currently configure my own keyboard
with the following command:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span><span class="nb">sudo </span>localectl set-x11-keymap us pc105 <span class="s2">""</span> ctrl:nocaps,esperanto:qwerty,lv3:ralt_switch,compose:rwin
</code></pre></div></div>

<p>From left to right, this specifies that:</p>

<ul>
  <li>I am using a <code class="language-plaintext highlighter-rouge">us</code> keyboard model.</li>
  <li>My keyboard has a <code class="language-plaintext highlighter-rouge">pc105</code> layout.</li>
  <li>I am not specifying a keyboard variant.  (The empty quotes are a placeholder.)</li>
  <li>I am specifying several options:
    <ul>
      <li><code class="language-plaintext highlighter-rouge">ctrl:nocaps</code> - Make the <code class="language-plaintext highlighter-rouge">CapsLock</code> key function as a <code class="language-plaintext highlighter-rouge">Ctrl</code> key.</li>
      <li><code class="language-plaintext highlighter-rouge">esperanto:qwerty</code> - Make the accented letters of Esperanto easily
accessible via the <code class="language-plaintext highlighter-rouge">AltGr</code> key.</li>
      <li><code class="language-plaintext highlighter-rouge">lv3:ralt_switch</code> - Make the right <code class="language-plaintext highlighter-rouge">Alt</code> key function as <code class="language-plaintext highlighter-rouge">AltGr</code>.</li>
      <li><code class="language-plaintext highlighter-rouge">compose:rwin</code> - Make the right <code class="language-plaintext highlighter-rouge">Windows</code> key function as the
<code class="language-plaintext highlighter-rouge">Compose</code> key.</li>
    </ul>
  </li>
</ul>

<p>The <code class="language-plaintext highlighter-rouge">localectl set-x11-keymap</code> command persistently configures X for
you, so it can be run once at system installation.  In order to select
among keyboard models, layouts, variants, and options, one can read
the <code class="language-plaintext highlighter-rouge">man</code> page for <code class="language-plaintext highlighter-rouge">xkeyboard-config</code> or use the following commands:</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">localectl list-x11-keymap-models</code></li>
  <li><code class="language-plaintext highlighter-rouge">localectl list-x11-keymap-layouts</code></li>
  <li><code class="language-plaintext highlighter-rouge">localectl list-x11-keymap-variants [layout]</code></li>
  <li><code class="language-plaintext highlighter-rouge">localectl list-x11-keymap-options</code></li>
</ul>

<p>With the <code class="language-plaintext highlighter-rouge">localectl set-x11-keymap</code> command above, if I am typing
something in Esperanto, I can type a <code class="language-plaintext highlighter-rouge">ĉ</code> by holding down <code class="language-plaintext highlighter-rouge">AltGr</code> (the
right <code class="language-plaintext highlighter-rouge">Alt</code> key) and pressing <code class="language-plaintext highlighter-rouge">c</code>.  The other accented characters for
Esperanto are keyed in similarly.  If I am typing in German then I can
create a <code class="language-plaintext highlighter-rouge">ü</code> character by holding down the <code class="language-plaintext highlighter-rouge">Compose</code> key (the right
<code class="language-plaintext highlighter-rouge">Windows</code> key) while typing a <code class="language-plaintext highlighter-rouge">"</code> character, then releasing and typing
a <code class="language-plaintext highlighter-rouge">u</code> character.  Similarly, if I am writing something in French and
want to type a <code class="language-plaintext highlighter-rouge">ç</code>, I need only hold down the <code class="language-plaintext highlighter-rouge">Compose</code> key while
pressing the <code class="language-plaintext highlighter-rouge">,</code> key, then release and type a <code class="language-plaintext highlighter-rouge">c</code>.  This works quite
well for my purposes.</p>]]></content><author><name></name></author><category term="tools" /><category term="tools" /><category term="multilingual" /><category term="x" /><category term="keyboard" /><summary type="html"><![CDATA[I occasionally need support for accented characters in X so that I can type documents in Esperanto, Latin, French, or German. Such support is actually quite easy to configure for X with modern Linux systems.]]></summary></entry><entry><title type="html">GNU Stow for Dotfile Management</title><link href="https://jsf9k.github.io/tools/2019/04/16/gnu-stow-for-dotfile-management.html" rel="alternate" type="text/html" title="GNU Stow for Dotfile Management" /><published>2019-04-16T15:43:24-04:00</published><updated>2019-04-16T15:43:24-04:00</updated><id>https://jsf9k.github.io/tools/2019/04/16/gnu-stow-for-dotfile-management</id><content type="html" xml:base="https://jsf9k.github.io/tools/2019/04/16/gnu-stow-for-dotfile-management.html"><![CDATA[<p>All serious computer users eventually struggle with the management of
their dotfiles.  In this post I’ll discuss what I think is a great
solution to this problem, and describe how I use it.</p>

<p>In the past I have tried to use a version control system to manage my
dotfiles, but it always failed.  The reason it failed is that the
files either live directly in your home directory or are scattered
among several different subdirectories in your home directory.  Making
your home directory itself a checkout of a git repository is
impractical because there are a lot of directories and files in there
that you don’t want to live in version control.</p>

<p>Eventually I came across the idea of using <a href="https://www.gnu.org/software/stow/stow.html">GNU
Stow</a> to manage my
dotfiles.  GNU Stow is a tool for creating and managing symlinks.  In
the past the tool was commonly used to switch between multiple
versions of a particular software package.  With the advent of package
managers that particular application of GNU Stow has become less
common, but the tool remains useful for managing dotfiles.</p>

<p>Suppose you want to manage your bash, emacs, screen, ssh, and X
dotfiles.  In your home directory, these files look something like
this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/home/username
|---- .bashrc
|---- .emacs.d
|   |---- init.el
|---- .screenrc
|---- .ssh
|   |--- config
|---- .xinitrc
|---- .xmodmaprc
|---- .Xresources
</code></pre></div></div>

<p>Let’s reproduce this structure using GNU Stow.  First create a git
repository called <code class="language-plaintext highlighter-rouge">.dotfiles</code> in your home directory, and inside that
repository create the directories <code class="language-plaintext highlighter-rouge">bash</code>, <code class="language-plaintext highlighter-rouge">emacs</code>, <code class="language-plaintext highlighter-rouge">screen</code>, <code class="language-plaintext highlighter-rouge">ssh</code>,
and <code class="language-plaintext highlighter-rouge">X</code>.  Next copy the dotfiles from your home directory into
<code class="language-plaintext highlighter-rouge">.dotfiles</code> so that you have a structure that looks like the
following:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/home/username/.dotfiles
|---- bash
|   |---- .bashrc
|---- emacs
|   |---- .emacs.d
|       |---- init.el
|---- screen
|   |---- .screenrc
|---- ssh
|   |---- .ssh
|       |--- config
|---- X
|   |---- .xinitrc
|   |---- .xmodmaprc
|   |---- .Xresources
</code></pre></div></div>

<p>Now <code class="language-plaintext highlighter-rouge">cd</code> into <code class="language-plaintext highlighter-rouge">.dotfiles</code> and run</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">for </span>d <span class="k">in</span> <span class="si">$(</span><span class="nb">ls</span><span class="si">)</span>
<span class="k">do
    </span>stow <span class="nv">$d</span>
<span class="k">done</span>
</code></pre></div></div>

<p>Et voilà!  At this point GNU Stow has deployed the symlinks and your
dotfiles are under version control.  Note also that your dotfile
symlinks may be scattered all over your home directory when deployed,
but your <code class="language-plaintext highlighter-rouge">.dotfiles</code> repository keeps the files themselves neatly
organized.</p>

<p>When I need to set up to work on a new machine I simply checkout
<code class="language-plaintext highlighter-rouge">.dotfiles</code> in the home directory, <code class="language-plaintext highlighter-rouge">cd</code> into <code class="language-plaintext highlighter-rouge">.dotfiles</code>, and again
run the <code class="language-plaintext highlighter-rouge">for</code> loop.  Now the new machine is configured to my liking.</p>]]></content><author><name></name></author><category term="tools" /><category term="gnu" /><category term="stow" /><category term="dotfiles" /><category term="tools" /><summary type="html"><![CDATA[All serious computer users eventually struggle with the management of their dotfiles. In this post I’ll discuss what I think is a great solution to this problem, and describe how I use it.]]></summary></entry><entry><title type="html">Professional Idiosyncracies</title><link href="https://jsf9k.github.io/me/2019/04/08/professional-idiosyncracies.html" rel="alternate" type="text/html" title="Professional Idiosyncracies" /><published>2019-04-08T15:43:24-04:00</published><updated>2019-04-08T15:43:24-04:00</updated><id>https://jsf9k.github.io/me/2019/04/08/professional-idiosyncracies</id><content type="html" xml:base="https://jsf9k.github.io/me/2019/04/08/professional-idiosyncracies.html"><![CDATA[<ul>
  <li>I’m old school.  I use <a href="https://www.gnu.org/software/emacs/">Emacs</a>
and the command line whenever possible.</li>
  <li>I use Linux exclusively both at home and at work.</li>
  <li>I don’t want eye candy cluttering up my screen, so I use
<a href="https://www.nongnu.org/ratpoison/">Ratpoison</a> as my window manager.
Ratpoison is essentially
<a href="https://www.gnu.org/software/screen/"><code class="language-plaintext highlighter-rouge">screen</code></a> for X.  I generally
have just Emacs, a terminal, and a browser running, each in a
full-screen window.</li>
  <li>I’ve found that using <a href="https://www.pckeyboard.com/page/product/UNI0P4A">a buckling-spring
keyboard</a> and <a href="https://www.kensington.com/p/products/control/trackballs/expert-mouse-wired-trackball/">a
trackball</a>
(instead of a mouse) helps reduce the frequency of my RSI flareups.
Using Ratpoison also helps, since it is a keyboard-driven window
manager.</li>
  <li>When I find myself in a shared workspace I use <a href="https://codekeyboards.com/">a keyboard with
Cherry MX Clears</a>.  I find those
switches simulate the tactile feedback I like without deafening
everyone around me.</li>
  <li>I don’t like strongly opinionated frameworks like
<a href="https://emberjs.com/">Ember.js</a> that magically do things for you
and hide all the complexity from the developer.  I like to know and
understand what is going on under the hood.</li>
  <li>At the same time, I’m a big fan of adopting an opinionated linter
such as <a href="https://black.readthedocs.io/en/stable/">Black</a> for each
project.  I want my projects to have a consistent coding style, but
I don’t want to spend time negotiating what that style should look
like.</li>
</ul>]]></content><author><name></name></author><category term="me" /><category term="emacs" /><category term="screen" /><category term="ratpoison" /><category term="linter" /><summary type="html"><![CDATA[I’m old school. I use Emacs and the command line whenever possible. I use Linux exclusively both at home and at work. I don’t want eye candy cluttering up my screen, so I use Ratpoison as my window manager. Ratpoison is essentially screen for X. I generally have just Emacs, a terminal, and a browser running, each in a full-screen window. I’ve found that using a buckling-spring keyboard and a trackball (instead of a mouse) helps reduce the frequency of my RSI flareups. Using Ratpoison also helps, since it is a keyboard-driven window manager. When I find myself in a shared workspace I use a keyboard with Cherry MX Clears. I find those switches simulate the tactile feedback I like without deafening everyone around me. I don’t like strongly opinionated frameworks like Ember.js that magically do things for you and hide all the complexity from the developer. I like to know and understand what is going on under the hood. At the same time, I’m a big fan of adopting an opinionated linter such as Black for each project. I want my projects to have a consistent coding style, but I don’t want to spend time negotiating what that style should look like.]]></summary></entry></feed>