<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" >

  <title>Erik L. Arneson — Writer and Software Developer</title>
  <subtitle>Erik L. Arneson is a freelance writer and software developer with WordPress experience. He is located in Portland, Oregon.</subtitle>
  <generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator>
  <link href="https://arnesonium.com/feeds/ubuntu.xml" rel="self" type="application/atom+xml" />
  <link href="https://arnesonium.com/" rel="alternate" type="text/html" />
  <updated>2026-06-18T15:03:10+00:00</updated>
  <id>https://arnesonium.com/feeds/ubuntu.xml</id>
  <author>
    <name>Erik L. Arneson</name>
  </author>
      <entry>
        
        <title>An Emacs Application Launcher for Regolith</title>
        <author>
          <name>Erik L. Arneson</name>
        </author>        
        <link href="https://arnesonium.com/2025/11/regolith-emacs-launcher" rel="alternate" type="text/html" title="An Emacs Application Launcher for Regolith" />
        <updated>2025-11-19T00:00:00+00:00</updated>
        <id>https://arnesonium.com/2025/11/regolith-emacs-launcher</id>
          <category term="emacs" />
        
          <category term="shell" />
        
          <category term="bash" />
        
          <category term="lisp" />
        
          <category term="programming" />
        
          <category term="ubuntu" />
        <content type="html" xml:base="https://arnesonium.com/2025/11/regolith-emacs-launcher">&lt;p&gt;I run the &lt;a href=&quot;https://regolith-desktop.com/&quot;&gt;Regolith Desktop Environment&lt;/a&gt; on my laptop, which I love because it provides a convenient GNOME wrapper and interface for the &lt;a href=&quot;https://i3wm.org/&quot;&gt;i3 tiling window manager&lt;/a&gt;. Regolith relies on a program called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ilia&lt;/code&gt; for application launching, and sometimes &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ilia&lt;/code&gt; gets caught in some kind of CPU-churning state that locks up my whole system. I have not been able to figure out what is causing it, so I (of course) turned to Emacs for a solution.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h2 id=&quot;turning-to-consult-omni&quot;&gt;Turning to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;consult-omni&lt;/code&gt;&lt;/h2&gt;

&lt;p&gt;Armin Darvish has created a powerful Emacs package called &lt;a href=&quot;https://github.com/armindarvish/consult-omni&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;consult-omni&lt;/code&gt;&lt;/a&gt;, which provides a wrapper around &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;consult&lt;/code&gt; for searching through any number of information sources. I believe &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;consult-omni&lt;/code&gt; was originally intended to query web search engines and document databases, but Darvish has also provided a search mode for your local desktop applications, and can act as an application launcher.&lt;/p&gt;

&lt;p&gt;Darvish provides an example application launcher in his &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;consult-omni&lt;/code&gt; YouTube tutorial. The source code is straightforward, but I wanted to tweak it just a little. You can view &lt;a href=&quot;https://github.com/armindarvish/consult-omni/wiki/YouTube-Tutorial#create-a-launcher&quot;&gt;his original on the project’s wiki on GitHub&lt;/a&gt;. You can watch him explain his technique below.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/wNH2E7iT__c?start=8595&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; referrerpolicy=&quot;strict-origin-when-cross-origin&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;After a few tweaks, here is what I came up with.&lt;/p&gt;

&lt;div class=&quot;language-emacs-lisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;consult-launcher&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;&quot;A launcher suitable for use from a window manager.&quot;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;interactive&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;let*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;floor&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.6&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;display-pixel-width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;
         &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;floor&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.6&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;display-pixel-height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;
         &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;floor&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;display-pixel-width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;
         &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;floor&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;display-pixel-height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;
         &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;omni-launcher&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cons&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;text-pixels&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
                   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cons&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;text-pixels&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
                   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                   &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;minibuffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;only&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
         &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;frame&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;make-frame&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;with-selected-frame&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;frame&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;select-frame-set-input-focus&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;;; If i3 is running and there is a control socket, let&apos;s tell&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;;; it we are a floating frame.&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;getenv&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;I3SOCK&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;call-process&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;i3-msg&quot;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;
                        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;[id=%s] floating enable&quot;&lt;/span&gt;
                                &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;s-trim&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;shell-command-to-string&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;xdotool getactivewindow&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))))&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;unwind-protect&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;progn&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;consult-omni-apps-static&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;.*&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;propertize&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&amp;gt; &quot;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;face&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&apos;consult-omni-path-face&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
                 &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;progn&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;frame-live-p&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;delete-frame&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
          &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I made two changes to get this to work nicely with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i3&lt;/code&gt;. First, I removed the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yequake&lt;/code&gt; dependency. Second, I added a call to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i3-msg&lt;/code&gt; that sets the launcher frame as floating, which makes it much nicer to use. Like Darvish’s version, you can run this from the command line:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;emacsclient -e &apos;(consult-launcher)&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;adding-an-ilia-fallback&quot;&gt;Adding an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ilia&lt;/code&gt; fallback&lt;/h2&gt;

&lt;p&gt;Don’t tell all the other Emacs users, but I don’t have Emacs set up to launch automatically when I start my computer and log into X11. I probably should, huh? Also, there are times when I (gasp!) shut down Emacs, usually to restart it or fix something that I have broken. When those times happen, I want to be able to launch applications, so I need a failsafe in case &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;consult-launcher&lt;/code&gt; isn’t available!&lt;/p&gt;

&lt;p&gt;To solve this, I created a simple shell wrapper script, which looks like this:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Check if Emacs server is running by looking for the server socket&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Default server name is &quot;server&quot;, but you can change this if needed&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;SERVER_NAME&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;EMACS_SERVER_NAME&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:-&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;SERVER_FILE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;XDG_RUNTIME_DIR&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:-&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/tmp&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/emacs/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;SERVER_NAME&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$SERVER_FILE&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;# Emacs is running, use emacsclient to launch your application&lt;/span&gt;
    emacsclient &lt;span class=&quot;nt&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;(consult-launcher)&apos;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;# Emacs is not running, fall back to ilia&lt;/span&gt;
    ilia &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; apps
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you want to use this, the important part is that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SERVER_FILE&lt;/code&gt; points to the socket that your Emacs server uses. Make sure that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;emacsclient&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ilia&lt;/code&gt; are both in a reasonable location so your shell can find them, then bind this command to whatever you usually use to launch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ilia&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;By the way, if you are using Regolith’s normal method of launching &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ilia&lt;/code&gt;, you can add your shell script to your Regolith configuration pretty easily. Open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$HOME/.config/regolith3/Xresources&lt;/code&gt; in your text editor, and add the line:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;wm.program.launcher.app: /path/to/your/launcher.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can then run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xrdb -override $HOME/.config/regolith3/Xresources&lt;/code&gt; and it should work! Good luck.&lt;/p&gt;

&lt;h2 id=&quot;drawbacks&quot;&gt;Drawbacks&lt;/h2&gt;

&lt;p&gt;One of the nice things about &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ilia&lt;/code&gt; is that it keeps track of applications your run frequently, so they tend to bubble up to the top of its application listing. The Emacs method doesn’t do that. I don’t mind so much, I always end up typing in application names. It is fun to use Emacs as an application launcher, and I hope that it helps me avoid the CPU-churn problem that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ilia&lt;/code&gt; has been experiencing far too often.&lt;/p&gt;

&lt;p&gt;Have I come up with a clever solution, or a lazy workaround? I’m looking forward to hearing your thoughts.&lt;/p&gt;</content>
      </entry>
    
      <entry>
        
        <title>Installing Emacs 29.1 on Ubuntu 22.04 LTS</title>
        <author>
          <name>Erik L. Arneson</name>
        </author>        
        <link href="https://arnesonium.com/2023/07/emacs-29-1-on-ubuntu-22-04-lts" rel="alternate" type="text/html" title="Installing Emacs 29.1 on Ubuntu 22.04 LTS" />
        <updated>2023-07-31T00:00:00+00:00</updated>
        <id>https://arnesonium.com/2023/07/emacs-291-ubuntu-2204LTS</id>
          <category term="emacs" />
        
          <category term="linux" />
        
          <category term="ubuntu" />
        
          <category term="howto" />
        <content type="html" xml:base="https://arnesonium.com/2023/07/emacs-29-1-on-ubuntu-22-04-lts">&lt;p&gt;You have probably heard by now, but &lt;a href=&quot;https://emacsredux.com/blog/2023/07/30/emacs-29-1-released/&quot;&gt;Emacs 29.1 has been released&lt;/a&gt;! Here are some reasons to upgrade and how to do so right away if you are running Ubuntu 22.04 LTS.
&lt;!--more--&gt;&lt;/p&gt;

&lt;h2 id=&quot;whats-new-with-emacs&quot;&gt;What’s New with Emacs?&lt;/h2&gt;

&lt;p&gt;One of the most exciting new features for me is &lt;a href=&quot;https://tree-sitter.github.io/tree-sitter/&quot;&gt;TreeSitter support&lt;/a&gt;, which provides incremental parsing capabilities for programming languages and other formatted files. This means that programming support will be getting faster, more comprehensive, and even better in future Emacs packages.&lt;/p&gt;

&lt;p&gt;Other new features include native WebP image support, pure GTK support, and the ability to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;emacs -x&lt;/code&gt; in the first line of a script, which could lead to some fun applications of Emacs Lisp. &lt;a href=&quot;https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29&quot;&gt;Read all of the release notes here!&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;installing-on-ubuntu-2204-lts&quot;&gt;Installing on Ubuntu 22.04 LTS&lt;/h2&gt;

&lt;p&gt;I am too impatient to wait for somebody to release a packaged version, so I installed Emacs 29.1 from source. It is fairly straightforward, though you will need to do a couple of special things to get all of the features you want.&lt;/p&gt;

&lt;h3 id=&quot;installing-the-requirements&quot;&gt;Installing the Requirements&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Note: All of the commands in this post assume you are using bash.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most of the extra libraries and packages you will need to build Emacs 29.1 are covered in the build dependencies for the stock Emacs package. However, to take advantage of some of the cool extra features now included in Emacs, you’ll need to install a few more things.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt build-dep emacs
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libgccjit0 libgccjit-10-dev libjansson4 libjansson-dev &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    gnutls-bin libtree-sitter-dev gcc-10 imagemagick libmagick++-dev &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    libwebp-dev webp libxft-dev libxft2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;preparing-to-build&quot;&gt;Preparing to Build&lt;/h3&gt;

&lt;p&gt;In order to get native compilation (a feature added in Emacs 28) working correctly, you will need to make sure your shell instructs the build system to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gcc-10&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;CC&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/usr/bin/gcc-10
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;CXX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/usr/bin/gcc-10
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;get-the-source-code-and-lets-compile&quot;&gt;Get the Source Code and Let’s Compile!&lt;/h3&gt;

&lt;p&gt;Download the Emacs 29.1 source code from &lt;a href=&quot;http://ftpmirror.gnu.org/emacs/&quot;&gt;a nearby GNU mirror&lt;/a&gt; and then extract it! Then follow the instructions below. Note that you might want to take a closer look at the options to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./configure&lt;/code&gt;. If you want native compilation, but don’t want to use the “ahead of time” option because it’s slow, you can remove the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;=aot&lt;/code&gt;. You might also want to stick Emacs in a different location using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--prefix&lt;/code&gt; option. For example, I used &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--prefix=/opt/emacs29&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;emacs-29.1
./autogen.sh
./configure &lt;span class=&quot;nt&quot;&gt;--with-native-compilation&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;aot &lt;span class=&quot;nt&quot;&gt;--with-imagemagick&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--with-json&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;--with-tree-sitter&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--with-xft&lt;/span&gt;
make &lt;span class=&quot;nt&quot;&gt;-j&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;nproc&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The build might take a while. With the “ahead of time” compilation, I think my build took ten or fifteen minutes. But once it is complete, try running your new Emacs binary to make sure it works.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;./src/emacs &lt;span class=&quot;nt&quot;&gt;-Q&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If it works, install it!&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;whats-next&quot;&gt;What’s Next&lt;/h2&gt;

&lt;p&gt;You’ve got Emacs 29.1 installed and running! This is exciting. Which new features do you want to try first?&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.masteringemacs.org/article/how-to-get-started-tree-sitter&quot;&gt;Get started with tree-sitter!&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;M-x eglot&lt;/code&gt; and see how cool language servers can be!&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.masteringemacs.org/article/whats-new-in-emacs-29-1&quot;&gt;Read about other new features in Emacs 29.1!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this article was helpful, and that you are enjoying the latest version of Emacs! I used it to write this blog post, so you know I am.&lt;/p&gt;</content>
      </entry>
    
      <entry>
        
        <title>Recording Podcasts in Linux</title>
        <author>
          <name>Erik L. Arneson</name>
        </author>        
        <link href="https://arnesonium.com/2018/04/recording-podcasts-in-linux/" rel="alternate" type="text/html" title="Recording Podcasts in Linux" />
        <updated>2018-04-01T23:23:02+00:00</updated>
        <id>https://arnesonium.com/2018/04/recording-podcasts-in-linux</id>
          <category term="alsa" />
        
          <category term="audio" />
        
          <category term="ecasound" />
        
          <category term="linux" />
        
          <category term="pulseaudio" />
        
          <category term="tutorial" />
        
          <category term="ubuntu" />
        <content type="html" xml:base="https://arnesonium.com/2018/04/recording-podcasts-in-linux/">&lt;p&gt;I co-host a podcast called &lt;a href=&quot;https://myalchemicalbromance.com/&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;My Alchemical Bromance&lt;/a&gt;, and one of the frequent challenges I end up facing is how to record video and voice chats for interviews. A lot of podcasters use external hardware devices, such as the &lt;a href=&quot;https://amzn.to/2Gt0iOc&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Focusrite Scarlett 2i4&lt;/a&gt;, which is a great solution. But I wanted to do it all in software—and in Linux.
&lt;!--more--&gt;&lt;/p&gt;

&lt;h2 id=&quot;my-configuration&quot;&gt;My Configuration&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://amzn.to/2GJJBgt&quot;&gt;&lt;img src=&quot;https://arnesonium.com/wp-content/uploads/2018/04/Blue-Snowball-USB-246x300.png#right&quot; alt=&quot;Blue Snowball USB microphone&quot; width=&quot;246&quot; height=&quot;300&quot; class=&quot;size-medium wp-image-797&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this setup, you need headphones, a microphone, and an Internet connection. I use a &lt;a href=&quot;https://amzn.to/2H4C8Gs&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Blue Snowball USB microphone&lt;/a&gt;, which is affordable, sturdy, and great quality for just recording a podcast.&lt;/p&gt;

&lt;h2 id=&quot;pulseaudio-and-alsa&quot;&gt;PulseAudio and ALSA&lt;/h2&gt;

&lt;p&gt;Anybody who’s played with audio stuff in Linux knows that it’s a total mess. I’m not going to try to explain it all in detail because I’ll get it wrong, and even this section I’m &lt;em&gt;probably&lt;/em&gt; going to get wrong. Feel free to correct me loudly in the comments. There are two very common audio interfaces that we have to deal with. First is ALSA, which is the Advanced Linux Sound Architecture and is the hardware driver layer of the audio system. Next is PulseAudio, which is a sound server that abstracts the hardware layer.&lt;/p&gt;

&lt;h3 id=&quot;pulseaudio-configuration&quot;&gt;PulseAudio Configuration&lt;/h3&gt;

&lt;p&gt;We need two pieces of information from PulseAudio: the system sound monitor, and the microphone monitor. Run the following command:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;pactl list | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-A2&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;Source #&apos;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You should get output that looks like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Source #0
	State: IDLE
	Name: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
--
Source #1
	State: SUSPENDED
	Name: alsa_input.pci-0000_00_1b.0.analog-stereo
--
Source #9
	State: SUSPENDED
	Name: alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-mono
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The bits you’re interested in are the “Name” for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;analog-stereo.monitor&lt;/code&gt; entry and the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;analog-mono&lt;/code&gt; entry. In my example, you will find them on lines 3 and 11. Save those for the next step.&lt;/p&gt;

&lt;h3 id=&quot;alsa-configuration&quot;&gt;ALSA Configuration&lt;/h3&gt;

&lt;p&gt;Because we’re going to use an ALSA-compatible tool for recording, we need to configure ALSA to talk to PulseAudio (which then talks to ALSA again on the backend – like I said, audio is confusing in Linux and I’m sorry that either of us has to spend any time thinking about it). You will want to open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$HOME/.asoundrc&lt;/code&gt; and add the following entries.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# Creating a system sound monitor
pcm.pulse_monitor {
  type pulse
  device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
}

ctl.pulse_monitor {
  type pulse
  device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
}

# Creating an ALSA interface for the USB microphone
pcm.pulse_usbmic {
  type pulse
  device alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-mono
}

ctl.pulse_usbmic {
  type pulse
  device alsa_input.usb-BLUE_MICROPHONE_Blue_Snowball_201305-00.analog-mono
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You will see that on lines 4 and 9, I used the name of the system monitor PulseAudio device from the previous step. Likewise, on lines 15 and 20, I used the name for the USB microphone device.&lt;/p&gt;

&lt;h2 id=&quot;actually-recording-things&quot;&gt;Actually Recording Things&lt;/h2&gt;

&lt;p&gt;I won’t strongly recommend any particular voice or video chat software in Linux over another. There are a few good ones I’ve used, such as Google Hangouts and Zoom. I’ve used Google Voice to record phone calls, too. Skype has been problematic for me, with lots of drop-outs and weird volume issues, but that could just be my setup. You will need to experiment and find out which works best for you.&lt;/p&gt;

&lt;p&gt;We will use &lt;a href=&quot;http://www.eca.cx/ecasound/&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Ecasound&lt;/a&gt; to record to hard disk. To install Ecasound in Ubuntu (and probably Debian), run this command:&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;ecasound ecatools
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To start recording, run this command:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ecasound &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
         &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt;:16,1,44100 &lt;span class=&quot;nt&quot;&gt;-a&lt;/span&gt;:1 &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; alsa,pulse_usbmic &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; ecatrack1.wav &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
         &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt;:16,2,44100 &lt;span class=&quot;nt&quot;&gt;-a&lt;/span&gt;:2 &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; alsa,pulse_monitor &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; ecatrack2.wav
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;At the “ecasound” prompt, type “start” to begin recording. When you are done, type “stop” and then “quit”. Your microphone audio will be in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ecatrack1.wav&lt;/code&gt; and your computer system audio will be in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ecatrack2.wav&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;timing-problems&quot;&gt;Timing Problems&lt;/h2&gt;

&lt;p&gt;This setup essentially uses two different hardware devices to record audio, so it will have one glaring problem: no two hardware timing clocks are the same. Both are sampling at 44.1kHz, but the crystals used to do the timing will never &lt;em&gt;exactly&lt;/em&gt; be at 41,000 samples per second. The variation compounds over time, so for long recordings you will notice unusual lag. This is probably why so many podcasters go for an external hardware solution. But if all you’ve got is a USB microphone and the truth, a software solution will have to do for now.&lt;/p&gt;

&lt;h2 id=&quot;good-luck&quot;&gt;Good Luck!&lt;/h2&gt;

&lt;p&gt;I hope this helps you do better, smarter podcasting. Podcasting in Linux is tricky. There aren’t a lot of good tutorials out there, so you’ll still have to figure a lot out on your own. If you have tips or tutorials that helped you out, please include them in the comments below! I certainly need them.&lt;/p&gt;</content>
      </entry>
    
</feed>
