This commit is contained in:
SqrtMinusOne 2022-06-24 15:56:41 +00:00
parent af61692e94
commit 88b49d2f1b
34 changed files with 70 additions and 166 deletions

View file

@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>https://sqrtminusone.xyz/configs/readme/</title>
<link rel="canonical" href="https://sqrtminusone.xyz/configs/readme/">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=https://sqrtminusone.xyz/configs/readme/">
</head>
</html>

View file

@ -63,6 +63,8 @@
<h1>Configs</h1>
<ul>
<li><a href="https://sqrtminusone.xyz/configs/readme/">0001-01-01 | </a></li>
<li><a href="https://sqrtminusone.xyz/configs/console/">0001-01-01 | Console</a></li>
<li><a href="https://sqrtminusone.xyz/configs/desktop/">0001-01-01 | Desktop</a></li>
@ -73,8 +75,6 @@
<li><a href="https://sqrtminusone.xyz/configs/mail/">0001-01-01 | Mail</a></li>
<li><a href="https://sqrtminusone.xyz/configs/readme/">0001-01-01 | My dotfiles</a></li>
</ul>
</div>

View file

@ -6,6 +6,15 @@
<description>Recent content in Configs on SqrtMinusOne</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language><atom:link href="https://sqrtminusone.xyz/configs/index.xml" rel="self" type="application/rss+xml" />
<item>
<title></title>
<link>https://sqrtminusone.xyz/configs/readme/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://sqrtminusone.xyz/configs/readme/</guid>
<description></description>
</item>
<item>
<title>Console</title>
<link>https://sqrtminusone.xyz/configs/console/</link>
@ -67,17 +76,5 @@ My email configration. Currently I use lieer to fetch emails from Gmail, davmail
My problem with any particular mail setup was that I use Gmail labels quite extensively, and handling these over IMAP is rather awkward. Notmuch seems to be the only software that provides the same first-class support for labels.</description>
</item>
<item>
<title>My dotfiles</title>
<link>https://sqrtminusone.xyz/configs/readme/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://sqrtminusone.xyz/configs/readme/</guid>
<description>These are my GNU/Linux configuration files. View at GitHub.
Most of the software is configured with literate configuration strategy via Emacs&amp;rsquo; Org Mode. This way has its pros and cons, but overall it&amp;rsquo;s pretty nice to keep the configs interweaved with comments in a handful of files.
The files themselves are managed and deployed via yadm, but I use Org Mode for things like config templating.
My current GNU/Linux distribution is GNU Guix.</description>
</item>
</channel>
</rss>

View file

@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>My dotfiles</title>
<title></title>
<meta name="description" content="Freedom is a state of mind">
<meta name="author" content='SqrtMinusOne'>
@ -59,94 +59,8 @@
<hr>
<div id="content">
<div class="container">
<h1>My dotfiles</h1>
<figure><img src="https://forthebadge.com/images/badges/works-on-my-machine.svg"/>
</figure>
<p>These are my GNU/Linux configuration files. <a href="https://github.com/SqrtMinusOne/dotfiles">View at GitHub</a>.</p>
<p>Most of the software is configured with <a href="https://leanpub.com/lit-config/read">literate configuration</a> strategy via Emacs&rsquo; <a href="https://orgmode.org/">Org Mode</a>. This way has its pros and cons, but overall it&rsquo;s pretty nice to keep the configs interweaved with comments in a handful of files.</p>
<p>The files themselves are managed and deployed via <a href="https://yadm.io/">yadm</a>, but I use Org Mode for things like config templating.</p>
<p>My current GNU/Linux distribution is <a href="https://guix.gnu.org/">GNU Guix</a>. I like Guix because, among other things, it allows <a href="https://guix.gnu.org/cookbook/en/html_node/Advanced-package-management.html#Advanced-package-management">declaring the required software</a> in configuration files, so I can have the same set of programs across multiple machines (look for tables with &ldquo;Guix dependency&rdquo; in the header).</p>
<p>The central program to all of that is, of course <a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>. As of the moment of this writing, it takes ~50% of my screen time and has the largest share of configuration here.</p>
<p>Table of contents and software:</p>
<ul>
<li><a href="/configs/emacs/">Emacs.org</a>
<ul>
<li><a href="/configs/emacs/">GNU Emacs</a></li>
</ul>
</li>
<li><a href="/configs/desktop/">Desktop.org</a>
<ul>
<li><em>Active</em>: <a href="/configs/desktop/#exwm">EXWM</a>, <a href="/configs/desktop/#polybar">Polybar</a>, <a href="/configs/desktop/#rofi">Rofi</a>, <a href="/configs/desktop/#flameshot">Flameshot</a>, <a href="/configs/desktop/#dunst">dunst</a>, <a href="/configs/desktop/#picom">Picom</a>, <a href="/configs/desktop/#zathura">Zathura</a></li>
<li><em>In Limbo</em>: <a href="/configs/desktop/#i3wm">i3wm</a>, <a href="/configs/desktop/#keynav">keynav</a></li>
</ul>
</li>
<li><a href="/configs/console/">Console.org</a>
<ul>
<li><em>Active</em>: <a href="/configs/console/#dot-profile">.profile</a>, <a href="/configs/console/#bash">Bash</a>, <a href="/configs/console/#fish">Fish</a>, <a href="/configs/console/#starship-prompt">Starship</a>, <a href="/configs/console/#tmux">Tmux</a>, <a href="/configs/console/#alacritty">Alacritty</a></li>
<li><em>In Limbo</em>: <a href="/configs/console/#nushell">Nushell</a></li>
</ul>
</li>
<li><a href="/configs/guix/">Guix.org</a></li>
<li><a href="/configs/mail/">Mail.org</a>
<ul>
<li><em>Active</em>: <a href="/configs/mail/#lieer">Lieer</a>, <a href="/configs/mail/#davmail">DavMail</a>, <a href="/configs/mail/#offlineimap">OfflineIMAP</a>, <a href="/configs/mail/#notmuch">Notmuch</a></li>
</ul>
</li>
</ul>
<p>(<em>Apparently, links on the second level work only in Emacs 🙁</em>)</p>
<p>A few other repositories I may consider a part of my config:</p>
<ul>
<li><a href="https://github.com/SqrtMinusOne/channel-q">channel-q</a> is my Guix channel</li>
<li><a href="https://github.com/SqrtMinusOne/sqrt-data">sqrt-data</a> is a home for my statistics gathering effort</li>
<li>Emacs packages that I wrote (some of them originated in my Emacs config):
<ul>
<li><a href="https://github.com/SqrtMinusOne/lyrics-fetcher.el">lyrics-fetcher.el</a></li>
<li><a href="https://github.com/SqrtMinusOne/pomm.el">pomm.el</a></li>
<li><a href="https://github.com/SqrtMinusOne/perspective-exwm.el">perspective-exwm.el</a></li>
<li><a href="https://github.com/SqrtMinusOne/exwm-modeline">exwm-modeline.el</a></li>
<li><a href="https://github.com/SqrtMinusOne/org-journal-tags">org-journal-tags</a></li>
<li><a href="https://github.com/SqrtMinusOne/elfeed-summary">elfeed-summary</a></li>
<li><a href="https://github.com/SqrtMinusOne/password-store-ivy">password-store-ivy</a></li>
<li><a href="https://github.com/SqrtMinusOne/elfeed-sync">elfeed-sync</a></li>
</ul>
</li>
</ul>
<p>Posts about my configuration:</p>
<ul>
<li><a href="https://sqrtminusone.xyz/posts/2022-05-09-pdf/">Extending elfeed with PDF viewer and subtitles fetcher</a></li>
<li><a href="https://sqrtminusone.xyz/posts/2022-02-12-literate/">A few cases of literate configuration</a></li>
<li><a href="https://sqrtminusone.xyz/posts/2022-01-03-exwm/">Using EXWM and perspective.el on a multi-monitor setup</a></li>
<li><a href="https://sqrtminusone.xyz/posts/2021-10-04-emacs-i3/">Getting a consistent set of keybindings between i3 and Emacs</a></li>
<li><a href="https://sqrtminusone.xyz/posts/2021-09-07-emms/">My EMMS and elfeed setup</a></li>
<li><a href="https://sqrtminusone.xyz/posts/2021-05-01-org-python/">Replacing Jupyter Notebook with Org Mode</a></li>
<li><a href="https://sqrtminusone.xyz/posts/2021-02-27-gmail/">Multiple Gmail accounts &amp; labels with Emacs</a></li>
</ul>
<h2 id="some-statistics">Some statistics</h2>
<figure><img src="https://sqrtminusone.xyz/stats/all.png"/>
</figure>
<figure><img src="https://sqrtminusone.xyz/stats/emacs-vim.png"/>
</figure>
<figure><img src="https://sqrtminusone.xyz/stats/literate-config.png"/>
</figure>
<h2 id="misc">Misc</h2>
<h3 id="notes">Notes</h3>
<ul>
<li><code>M-u C-c C-v t</code> to tangle a particular block</li>
<li><code>M-u M-u C-c C-v t</code> to tangle a particular file</li>
<li><code>C-c C-v d</code> to demarcate a block</li>
</ul>
<p>Uses yadm&rsquo;s <code>post_alt</code> hook to create symlinks</p>
<h3 id="encrypted-files">Encrypted files</h3>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>Mail/thexcloud/.credentials.gmailieer.json
</span></span><span style="display:flex;"><span>Mail/progin6304/.credentials.gmailieer.json
</span></span><span style="display:flex;"><span>.emacs.d/private.org
</span></span><span style="display:flex;"><span>.emacs.d/private.el
</span></span><span style="display:flex;"><span>.emacs.d/.trello/sqrtminusone.el
</span></span></code></pre></div>
<h1></h1>
</div>
</div><div id="footer" class="mb-5">

View file

Before

Width:  |  Height:  |  Size: 928 KiB

After

Width:  |  Height:  |  Size: 928 KiB

View file

Before

Width:  |  Height:  |  Size: 492 KiB

After

Width:  |  Height:  |  Size: 492 KiB

View file

Before

Width:  |  Height:  |  Size: 522 KiB

After

Width:  |  Height:  |  Size: 522 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 637 KiB

After

Width:  |  Height:  |  Size: 637 KiB

View file

Before

Width:  |  Height:  |  Size: 344 KiB

After

Width:  |  Height:  |  Size: 344 KiB

View file

Before

Width:  |  Height:  |  Size: 671 KiB

After

Width:  |  Height:  |  Size: 671 KiB

View file

Before

Width:  |  Height:  |  Size: 724 KiB

After

Width:  |  Height:  |  Size: 724 KiB

View file

@ -450,7 +450,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;:overwrite&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;current-prefix-arg&lt;/span&gt;)))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the &lt;code&gt;my/elfeed-show-rdrview-html&lt;/code&gt; variable is bound and true, then the content in this buffer was retrieved via &lt;code&gt;rdrview&lt;/code&gt;, so we&amp;rsquo;ll use that instead of the output of &lt;code&gt;elfeed-deref&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now we can open elfeed entries in a PDF viewer, which I find much nicer to read. Given that RSS feeds generally ship with simpler HTML than the regular websites, results usually look awesome:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/pdf-prot.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/pdf-prot.png&#34;/&gt;
&lt;/figure&gt;
&lt;h3 id=&#34;opening-arbitrary-sites&#34;&gt;Opening arbitrary sites&lt;/h3&gt;
@ -489,7 +489,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Unfortunately, this part doesn&amp;rsquo;t work that well, so we can&amp;rsquo;t just uninstall Firefox or Chromium and browse the web from a PDF viewer.&lt;/p&gt;
&lt;p&gt;The most common problem I&amp;rsquo;ve encountered is incorrectly formed pictures, such as &lt;code&gt;.png&lt;/code&gt; files without the boundary info. I&amp;rsquo;m sure you&amp;rsquo;ve also come across this if you ever tried to insert a lot of Internet pictures into a LaTeX document.&lt;/p&gt;
&lt;p&gt;However, sans the pictures issue, for certain sites like Wikipedia this is usable. For instance, here&amp;rsquo;s how the Emacs page looks:
&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/pdf-emacs.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;img src=&#34;https://sqrtminusone.xyz/images/pdf-emacs.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;youtube-transcripts&#34;&gt;YouTube transcripts&lt;/h2&gt;
&lt;h3 id=&#34;getting-subtitles&#34;&gt;Getting subtitles&lt;/h3&gt;
&lt;p&gt;Finally, let&amp;rsquo;s get to transcripts.&lt;/p&gt;
@ -584,7 +584,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; (&lt;span style=&#34;color:#008000&#34;&gt;setq-local&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;subed-mpv-video-file&lt;/span&gt; (&lt;span style=&#34;color:#19177c&#34;&gt;elfeed-entry-link&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;entry&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; (&lt;span style=&#34;color:#19177c&#34;&gt;subed-mpv--play&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;subed-mpv-video-file&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And here&amp;rsquo;s how it looks when used (the video on the screenshot is &lt;a href=&#34;https://www.youtube.com/watch?v=qjAIXCmhCQQ&#34;&gt;this System Crafters&amp;rsquo; stream&lt;/a&gt;):
&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/pdf-subed.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;img src=&#34;https://sqrtminusone.xyz/images/pdf-subed.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Keep in mind that this function has to be launched inside the buffer opened by the &lt;code&gt;my/elfeed-youtube-subtitles&lt;/code&gt; function.&lt;/p&gt;
</content>
@ -846,7 +846,7 @@
&lt;h2 id=&#34;polybar&#34;&gt;Polybar&lt;/h2&gt;
&lt;p&gt;Now, the most &lt;del&gt;crazy&lt;/del&gt; advanced case I&amp;rsquo;ve come up with so far.&lt;/p&gt;
&lt;p&gt;Basically, here is how my &lt;a href=&#34;https://github.com/polybar/polybar&#34;&gt;polybar&lt;/a&gt; currently looks:
&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/literate--polybar.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;img src=&#34;https://sqrtminusone.xyz/images/literate--polybar.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;It has:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;colors from the general color theme;&lt;/li&gt;
@ -1204,8 +1204,8 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;workspaces 2 and 3 on the machine with hostname &amp;ldquo;indigo&amp;rdquo; will be displayed on the monitor &lt;code&gt;DVI-D-0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;However, some features, common in other tiling WMs, are missing in EXWM out of the box, namely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a command to &lt;a href=&#34;https://i3wm.org/docs/userguide.html#%5Ffocusing%5Fmoving%5Fcontainers&#34;&gt;switch to another monitor&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;a command to &lt;a href=&#34;https://i3wm.org/docs/userguide.html#move%5Fto%5Foutputs&#34;&gt;move the current workspace to another monitor&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;a command to &lt;a href=&#34;https://i3wm.org/docs/userguide.html#_focusing_moving_containers&#34;&gt;switch to another monitor&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;a command to &lt;a href=&#34;https://i3wm.org/docs/userguide.html#move_to_outputs&#34;&gt;move the current workspace to another monitor&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;using the same commands to switch between windows and monitors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&amp;rsquo;s my take on implementing them.&lt;/p&gt;
@ -1264,7 +1264,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;switch-to-another-monitor&#34;&gt;Switch to another monitor&lt;/h3&gt;
&lt;p&gt;With the functions from the previous two sections, we can implement switching to another monitor by switching to the most recently used workspace on that monitor.&lt;/p&gt;
&lt;video controls width=&#34;100%&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/ox-hugo/exwm-workspace-switch.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/videos/exwm-workspace-switch.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;p&gt;One caveat here is that on the startup the &lt;code&gt;my/exwm-last-workspaces&lt;/code&gt; variable won&amp;rsquo;t have any values from other monitor(s), so this list is concatenated with the list of available workspace indices.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;defun&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;my/exwm-switch-to-other-monitor&lt;/span&gt; (&lt;span style=&#34;color:#008000&#34;&gt;&amp;amp;optional&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;dir&lt;/span&gt;)
@ -1286,7 +1286,7 @@
&lt;h3 id=&#34;move-the-workspace-to-another-monitor&#34;&gt;Move the workspace to another monitor&lt;/h3&gt;
&lt;p&gt;Now, moving the workspace to another monitor.&lt;/p&gt;
&lt;video controls width=&#34;100%&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/ox-hugo/exwm-workspace-move.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/videos/exwm-workspace-move.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;p&gt;This is actually quite easy to pull off - one just has to update &lt;code&gt;exwm-randr-workspace-monitor-plist&lt;/code&gt; accordingly and run &lt;code&gt;exwm-randr-refresh&lt;/code&gt;. I just add another check there because I don&amp;rsquo;t want some monitor to remain without workspaces at all.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;defun&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;my/exwm-workspace-switch-monitor&lt;/span&gt; ()
@ -1389,7 +1389,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;resizing-windows&#34;&gt;Resizing windows&lt;/h3&gt;
&lt;p&gt;I find this odd that there are different commands to resize tiling and floating windows.&lt;/p&gt;
&lt;video controls width=&#34;100%&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/ox-hugo/exwm-resize-hydra.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/videos/exwm-resize-hydra.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;p&gt;So let&amp;rsquo;s define one command to perform both resizes depending on the context:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;setq&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;my/exwm-resize-value&lt;/span&gt; &lt;span style=&#34;color:#666&#34;&gt;5&lt;/span&gt;)
@ -1501,7 +1501,7 @@
&lt;p&gt;One common point of criticism of i3 is that it is not extensible enough, especially compared to WMs that are configured in an actual programing language, like the mentioned XMonad, &lt;a href=&#34;http://www.qtile.org/&#34;&gt;Qtile&lt;/a&gt;, &lt;a href=&#34;https://awesomewm.org/&#34;&gt;Awesome&lt;/a&gt;, etc. But I think i3&amp;rsquo;s extensibility is underappreciated, although the contents of this article may lie closer to the limits of how far one can go there.&lt;/p&gt;
&lt;p&gt;Here is a small demo of how it currently works:&lt;/p&gt;
&lt;video controls width=&#34;100%&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/ox-hugo/i3-emacs-demo.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/static/videos/i3-emacs-demo.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;h2 id=&#34;emacs-integration&#34;&gt;Emacs integration&lt;/h2&gt;
&lt;p&gt;What I&amp;rsquo;m trying to do is actually quite simple, so I&amp;rsquo;m somewhat surprised I didn&amp;rsquo;t find anything similar on the Internet. But I didn&amp;rsquo;t look too hard.&lt;/p&gt;
@ -1697,7 +1697,7 @@
<guid>https://sqrtminusone.xyz/posts/2021-09-07-emms/</guid>
<content type="html">
&lt;h2 id=&#34;intro&#34;&gt;Intro&lt;/h2&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/emms-screenshot.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/emms/emms-screenshot.png&#34;/&gt;
&lt;/figure&gt;
&lt;p&gt;This is the current state of my quest to live in Emacs, at least in part of reading RSS and music.&lt;/p&gt;
@ -1936,7 +1936,7 @@
<guid>https://sqrtminusone.xyz/posts/2021-05-01-org-python/</guid>
<content type="html">
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/org-python-screenshot.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/org-python/org-python-screenshot.png&#34;/&gt;
&lt;/figure&gt;
&lt;h2 id=&#34;why&#34;&gt;Why?&lt;/h2&gt;
@ -2275,7 +2275,7 @@
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_CLASS: org-plain-extarticle
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_CLASS_OPTIONS: [a4paper, 14pt]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;14pt size is required by certain state standards of ours for some reason.&lt;/p&gt;
&lt;p&gt;After which you can put whatever you want in the preamble with &lt;code&gt;LATEX_HEADER&lt;/code&gt;. My workflow with LaTeX is to write a bunch of &lt;code&gt;.sty&lt;/code&gt; files beforehand and import the necessary ones in the preamble. &lt;a href=&#34;https://github.com/SqrtMinusOne/LaTeX%5Ftemplates&#34;&gt;Here&lt;/a&gt; is the repo with these files, although quite predictably, it&amp;rsquo;s a mess. At any rate, I have to write something like the following in the target Org file:&lt;/p&gt;
&lt;p&gt;After which you can put whatever you want in the preamble with &lt;code&gt;LATEX_HEADER&lt;/code&gt;. My workflow with LaTeX is to write a bunch of &lt;code&gt;.sty&lt;/code&gt; files beforehand and import the necessary ones in the preamble. &lt;a href=&#34;https://github.com/SqrtMinusOne/LaTeX_templates&#34;&gt;Here&lt;/a&gt; is the repo with these files, although quite predictably, it&amp;rsquo;s a mess. At any rate, I have to write something like the following in the target Org file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_HEADER: \usepackage{styles/generalPreamble}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_HEADER: \usepackage{styles/reportFormat}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_HEADER: \usepackage{styles/mintedSourceCode}
@ -2305,10 +2305,10 @@
&lt;p&gt;Any classical IMAP/SMTP client is hard to use in my case, because a message with multiple labels is copied to IMAP folders for each of the label plus the inbox folder, and the copies look like different messages from the client-side. For example, a message can be read in one label and unread in another.&lt;/p&gt;
&lt;p&gt;For a few years, my solution was &lt;a href=&#34;https://getmailspring.com/&#34;&gt;Mailspring&lt;/a&gt;, which provides first-class support for labels. However, it has a feature to deploy &lt;a href=&#34;https://www.bbc.com/news/technology-56071437&#34;&gt;spy pixels&lt;/a&gt; on emails (and offers no protection from them, obviously), the client is Electron-based with a mouse-driven interface, and the sync engine was closed-source at the time.&lt;/p&gt;
&lt;p&gt;So, I found an alternative in Emacs+notmuch+lieer and ditched one more proprietary app (the last big one I can&amp;rsquo;t let go of is DataGrip).&lt;/p&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/main.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/gmail/main.png&#34;/&gt;
&lt;/figure&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/mail.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/gmail/mail.png&#34;/&gt;
&lt;/figure&gt;
&lt;p&gt;Notmuch&amp;rsquo;s tags are just as advanced as Gmail&amp;rsquo;s labels, so I have basically the same mail structure accessible from Emacs, Gmail Android client and even the web UI when I don&amp;rsquo;t have access to the first two.&lt;/p&gt;
@ -2334,6 +2334,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install .
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After which we may check if the &lt;code&gt;gmi&lt;/code&gt; executable is available:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;which gmi
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/home/pavel/Programs/miniconda3/envs/mail/bin/gmi
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;notmuch&#34;&gt;Notmuch&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://notmuchmail.org/&#34;&gt;Notmuch&lt;/a&gt; is present in most of the package repositories, so you can install it with your package manager, which is &lt;code&gt;pacman&lt;/code&gt; in my case.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S notmuch
@ -2426,7 +2427,7 @@
&lt;p&gt;Authorization parameters will be saved to your &lt;a href=&#34;https://www.emacswiki.org/emacs/GnusAuthinfo&#34;&gt;authinfo&lt;/a&gt; file. If you didn&amp;rsquo;t have one, the plaintext &lt;code&gt;.authinfo&lt;/code&gt; will be created, so it&amp;rsquo;s reasonable to encrypt it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;cd&lt;/span&gt; ~
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg -o .authinfo.gpg -c --cipher-algo AES256 .authinfo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, if you plan to use multiple accounts with different SMTP servers, it makes more sense to use something like &lt;a href=&#34;https://marlam.de/msmtp/msmtp.html&#34;&gt;MSMTP&lt;/a&gt; to manage multiple accounts. Here are a couple of examples (&lt;a href=&#34;https://www.reddit.com/r/emacs/comments/9piml5/a%5Ffew%5Fquick%5Femacsnotmuch%5Fquestions/e83zcck?utm%5Fsource=share&amp;amp;utm%5Fmedium=web2x&amp;amp;context=3&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://www.reddit.com/r/emacs/comments/9piml5/a%5Ffew%5Fquick%5Femacsnotmuch%5Fquestions/e84otah?utm%5Fsource=share&amp;amp;utm%5Fmedium=web2x&amp;amp;context=3&#34;&gt;2&lt;/a&gt;) how to do that.&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, if you plan to use multiple accounts with different SMTP servers, it makes more sense to use something like &lt;a href=&#34;https://marlam.de/msmtp/msmtp.html&#34;&gt;MSMTP&lt;/a&gt; to manage multiple accounts. Here are a couple of examples (&lt;a href=&#34;https://www.reddit.com/r/emacs/comments/9piml5/a_few_quick_emacsnotmuch_questions/e83zcck?utm_source=share&amp;amp;utm_medium=web2x&amp;amp;context=3&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://www.reddit.com/r/emacs/comments/9piml5/a_few_quick_emacsnotmuch_questions/e84otah?utm_source=share&amp;amp;utm_medium=web2x&amp;amp;context=3&#34;&gt;2&lt;/a&gt;) how to do that.&lt;/p&gt;
&lt;p&gt;Another alternative for Gmail is to use &lt;a href=&#34;https://github.com/gauteh/lieer/wiki/GNU-Emacs-and-Lieer&#34;&gt;lieer as sendmail program&lt;/a&gt;. That may make sense if you don&amp;rsquo;t want to enable IMAP and SMTP on your account.&lt;/p&gt;
&lt;p&gt;There are also &lt;a href=&#34;https://notmuchmail.org/emacstips/#index13h2&#34;&gt;a bunch of ways&lt;/a&gt; to set up address completion if the built-in completion based on notmuch database does not suffice.&lt;/p&gt;
&lt;p&gt;I also use &lt;a href=&#34;https://github.com/mhayashi1120/Emacs-langtool&#34;&gt;LanguageTool for Emacs&lt;/a&gt; to do a spell checking of important emails (integrations like that really make Emacs shine). For some reason, developers don&amp;rsquo;t give a link to download the server on the frontpage, so &lt;a href=&#34;https://dev.languagetool.org/http-server&#34;&gt;here it is&lt;/a&gt;. And here is the relevant part of my Emacs config:&lt;/p&gt;
@ -2526,7 +2527,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The script is launched with cron every 5 minutes:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*/5 * * * * bash /home/pavel/bin/scripts/check-email
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s how the notification looks like:
&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/notification.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;img src=&#34;https://sqrtminusone.xyz/images/gmail/notification.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;caveats&#34;&gt;Caveats&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/gauteh/lieer#caveats&#34;&gt;lieer&lt;/a&gt; has an extensive list of caveats concerning Gmail API&lt;/li&gt;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 KiB

View file

@ -66,10 +66,10 @@
<p>Any classical IMAP/SMTP client is hard to use in my case, because a message with multiple labels is copied to IMAP folders for each of the label plus the inbox folder, and the copies look like different messages from the client-side. For example, a message can be read in one label and unread in another.</p>
<p>For a few years, my solution was <a href="https://getmailspring.com/">Mailspring</a>, which provides first-class support for labels. However, it has a feature to deploy <a href="https://www.bbc.com/news/technology-56071437">spy pixels</a> on emails (and offers no protection from them, obviously), the client is Electron-based with a mouse-driven interface, and the sync engine was closed-source at the time.</p>
<p>So, I found an alternative in Emacs+notmuch+lieer and ditched one more proprietary app (the last big one I can&rsquo;t let go of is DataGrip).</p>
<figure><img src="/ox-hugo/main.png"/>
<figure><img src="/images/gmail/main.png"/>
</figure>
<figure><img src="/ox-hugo/mail.png"/>
<figure><img src="/images/gmail/mail.png"/>
</figure>
<p>Notmuch&rsquo;s tags are just as advanced as Gmail&rsquo;s labels, so I have basically the same mail structure accessible from Emacs, Gmail Android client and even the web UI when I don&rsquo;t have access to the first two.</p>
@ -95,6 +95,7 @@
</span></span><span style="display:flex;"><span>pip install .
</span></span></code></pre></div><p>After which we may check if the <code>gmi</code> executable is available:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>which gmi
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>/home/pavel/Programs/miniconda3/envs/mail/bin/gmi
</span></span></code></pre></div><h3 id="notmuch">Notmuch</h3>
<p><a href="https://notmuchmail.org/">Notmuch</a> is present in most of the package repositories, so you can install it with your package manager, which is <code>pacman</code> in my case.</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo pacman -S notmuch
@ -187,7 +188,7 @@
<p>Authorization parameters will be saved to your <a href="https://www.emacswiki.org/emacs/GnusAuthinfo">authinfo</a> file. If you didn&rsquo;t have one, the plaintext <code>.authinfo</code> will be created, so it&rsquo;s reasonable to encrypt it:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#008000">cd</span> ~
</span></span><span style="display:flex;"><span>gpg -o .authinfo.gpg -c --cipher-algo AES256 .authinfo
</span></span></code></pre></div><p>However, if you plan to use multiple accounts with different SMTP servers, it makes more sense to use something like <a href="https://marlam.de/msmtp/msmtp.html">MSMTP</a> to manage multiple accounts. Here are a couple of examples (<a href="https://www.reddit.com/r/emacs/comments/9piml5/a%5Ffew%5Fquick%5Femacsnotmuch%5Fquestions/e83zcck?utm%5Fsource=share&amp;utm%5Fmedium=web2x&amp;context=3">1</a>, <a href="https://www.reddit.com/r/emacs/comments/9piml5/a%5Ffew%5Fquick%5Femacsnotmuch%5Fquestions/e84otah?utm%5Fsource=share&amp;utm%5Fmedium=web2x&amp;context=3">2</a>) how to do that.</p>
</span></span></code></pre></div><p>However, if you plan to use multiple accounts with different SMTP servers, it makes more sense to use something like <a href="https://marlam.de/msmtp/msmtp.html">MSMTP</a> to manage multiple accounts. Here are a couple of examples (<a href="https://www.reddit.com/r/emacs/comments/9piml5/a_few_quick_emacsnotmuch_questions/e83zcck?utm_source=share&amp;utm_medium=web2x&amp;context=3">1</a>, <a href="https://www.reddit.com/r/emacs/comments/9piml5/a_few_quick_emacsnotmuch_questions/e84otah?utm_source=share&amp;utm_medium=web2x&amp;context=3">2</a>) how to do that.</p>
<p>Another alternative for Gmail is to use <a href="https://github.com/gauteh/lieer/wiki/GNU-Emacs-and-Lieer">lieer as sendmail program</a>. That may make sense if you don&rsquo;t want to enable IMAP and SMTP on your account.</p>
<p>There are also <a href="https://notmuchmail.org/emacstips/#index13h2">a bunch of ways</a> to set up address completion if the built-in completion based on notmuch database does not suffice.</p>
<p>I also use <a href="https://github.com/mhayashi1120/Emacs-langtool">LanguageTool for Emacs</a> to do a spell checking of important emails (integrations like that really make Emacs shine). For some reason, developers don&rsquo;t give a link to download the server on the frontpage, so <a href="https://dev.languagetool.org/http-server">here it is</a>. And here is the relevant part of my Emacs config:</p>
@ -287,7 +288,7 @@
</span></span></code></pre></div><p>The script is launched with cron every 5 minutes:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>*/5 * * * * bash /home/pavel/bin/scripts/check-email
</span></span></code></pre></div><p>Here&rsquo;s how the notification looks like:
<img src="/ox-hugo/notification.png" alt=""></p>
<img src="/images/gmail/notification.png" alt=""></p>
<h2 id="caveats">Caveats</h2>
<ul>
<li><a href="https://github.com/gauteh/lieer#caveats">lieer</a> has an extensive list of caveats concerning Gmail API</li>

View file

@ -60,7 +60,7 @@
<div id="content">
<div class="container">
<h1>Replacing Jupyter Notebook with Org Mode</h1>
<figure><img src="/ox-hugo/org-python-screenshot.png"/>
<figure><img src="/images/org-python/org-python-screenshot.png"/>
</figure>
<h2 id="why">Why?</h2>
@ -399,7 +399,7 @@
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>#+LATEX_CLASS: org-plain-extarticle
</span></span><span style="display:flex;"><span>#+LATEX_CLASS_OPTIONS: [a4paper, 14pt]
</span></span></code></pre></div><p>14pt size is required by certain state standards of ours for some reason.</p>
<p>After which you can put whatever you want in the preamble with <code>LATEX_HEADER</code>. My workflow with LaTeX is to write a bunch of <code>.sty</code> files beforehand and import the necessary ones in the preamble. <a href="https://github.com/SqrtMinusOne/LaTeX%5Ftemplates">Here</a> is the repo with these files, although quite predictably, it&rsquo;s a mess. At any rate, I have to write something like the following in the target Org file:</p>
<p>After which you can put whatever you want in the preamble with <code>LATEX_HEADER</code>. My workflow with LaTeX is to write a bunch of <code>.sty</code> files beforehand and import the necessary ones in the preamble. <a href="https://github.com/SqrtMinusOne/LaTeX_templates">Here</a> is the repo with these files, although quite predictably, it&rsquo;s a mess. At any rate, I have to write something like the following in the target Org file:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>#+LATEX_HEADER: \usepackage{styles/generalPreamble}
</span></span><span style="display:flex;"><span>#+LATEX_HEADER: \usepackage{styles/reportFormat}
</span></span><span style="display:flex;"><span>#+LATEX_HEADER: \usepackage{styles/mintedSourceCode}

View file

@ -61,7 +61,7 @@
<div class="container">
<h1>My EMMS and elfeed setup</h1>
<h2 id="intro">Intro</h2>
<figure><img src="/ox-hugo/emms-screenshot.png"/>
<figure><img src="/images/emms/emms-screenshot.png"/>
</figure>
<p>This is the current state of my quest to live in Emacs, at least in part of reading RSS and music.</p>

View file

@ -66,7 +66,7 @@
<p>One common point of criticism of i3 is that it is not extensible enough, especially compared to WMs that are configured in an actual programing language, like the mentioned XMonad, <a href="http://www.qtile.org/">Qtile</a>, <a href="https://awesomewm.org/">Awesome</a>, etc. But I think i3&rsquo;s extensibility is underappreciated, although the contents of this article may lie closer to the limits of how far one can go there.</p>
<p>Here is a small demo of how it currently works:</p>
<video controls width="100%">
<source src="/ox-hugo/i3-emacs-demo.mp4" type="video/mp4">
<source src="/static/videos/i3-emacs-demo.mp4" type="video/mp4">
</video>
<h2 id="emacs-integration">Emacs integration</h2>
<p>What I&rsquo;m trying to do is actually quite simple, so I&rsquo;m somewhat surprised I didn&rsquo;t find anything similar on the Internet. But I didn&rsquo;t look too hard.</p>

View file

@ -156,8 +156,8 @@
</span></span></code></pre></div><p>workspaces 2 and 3 on the machine with hostname &ldquo;indigo&rdquo; will be displayed on the monitor <code>DVI-D-0</code>.</p>
<p>However, some features, common in other tiling WMs, are missing in EXWM out of the box, namely:</p>
<ul>
<li>a command to <a href="https://i3wm.org/docs/userguide.html#%5Ffocusing%5Fmoving%5Fcontainers">switch to another monitor</a>;</li>
<li>a command to <a href="https://i3wm.org/docs/userguide.html#move%5Fto%5Foutputs">move the current workspace to another monitor</a>;</li>
<li>a command to <a href="https://i3wm.org/docs/userguide.html#_focusing_moving_containers">switch to another monitor</a>;</li>
<li>a command to <a href="https://i3wm.org/docs/userguide.html#move_to_outputs">move the current workspace to another monitor</a>;</li>
<li>using the same commands to switch between windows and monitors.</li>
</ul>
<p>Here&rsquo;s my take on implementing them.</p>
@ -216,7 +216,7 @@
</span></span></code></pre></div><h3 id="switch-to-another-monitor">Switch to another monitor</h3>
<p>With the functions from the previous two sections, we can implement switching to another monitor by switching to the most recently used workspace on that monitor.</p>
<video controls width="100%">
<source src="/ox-hugo/exwm-workspace-switch.mp4" type="video/mp4">
<source src="/videos/exwm-workspace-switch.mp4" type="video/mp4">
</video>
<p>One caveat here is that on the startup the <code>my/exwm-last-workspaces</code> variable won&rsquo;t have any values from other monitor(s), so this list is concatenated with the list of available workspace indices.</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">defun</span> <span style="color:#19177c">my/exwm-switch-to-other-monitor</span> (<span style="color:#008000">&amp;optional</span> <span style="color:#19177c">dir</span>)
@ -238,7 +238,7 @@
<h3 id="move-the-workspace-to-another-monitor">Move the workspace to another monitor</h3>
<p>Now, moving the workspace to another monitor.</p>
<video controls width="100%">
<source src="/ox-hugo/exwm-workspace-move.mp4" type="video/mp4">
<source src="/videos/exwm-workspace-move.mp4" type="video/mp4">
</video>
<p>This is actually quite easy to pull off - one just has to update <code>exwm-randr-workspace-monitor-plist</code> accordingly and run <code>exwm-randr-refresh</code>. I just add another check there because I don&rsquo;t want some monitor to remain without workspaces at all.</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">defun</span> <span style="color:#19177c">my/exwm-workspace-switch-monitor</span> ()
@ -341,7 +341,7 @@
</span></span></code></pre></div><h3 id="resizing-windows">Resizing windows</h3>
<p>I find this odd that there are different commands to resize tiling and floating windows.</p>
<video controls width="100%">
<source src="/ox-hugo/exwm-resize-hydra.mp4" type="video/mp4">
<source src="/videos/exwm-resize-hydra.mp4" type="video/mp4">
</video>
<p>So let&rsquo;s define one command to perform both resizes depending on the context:</p>
<div class="highlight"><pre tabindex="0" style=";-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-emacs-lisp" data-lang="emacs-lisp"><span style="display:flex;"><span>(<span style="color:#008000">setq</span> <span style="color:#19177c">my/exwm-resize-value</span> <span style="color:#666">5</span>)

View file

@ -309,7 +309,7 @@
<h2 id="polybar">Polybar</h2>
<p>Now, the most <del>crazy</del> advanced case I&rsquo;ve come up with so far.</p>
<p>Basically, here is how my <a href="https://github.com/polybar/polybar">polybar</a> currently looks:
<img src="/ox-hugo/literate--polybar.png" alt=""></p>
<img src="/images/literate--polybar.png" alt=""></p>
<p>It has:</p>
<ul>
<li>colors from the general color theme;</li>

View file

@ -496,7 +496,7 @@
</span></span><span style="display:flex;"><span> <span style="color:#008000">:overwrite</span> <span style="color:#19177c">current-prefix-arg</span>)))
</span></span></code></pre></div><p>If the <code>my/elfeed-show-rdrview-html</code> variable is bound and true, then the content in this buffer was retrieved via <code>rdrview</code>, so we&rsquo;ll use that instead of the output of <code>elfeed-deref</code>.</p>
<p>Now we can open elfeed entries in a PDF viewer, which I find much nicer to read. Given that RSS feeds generally ship with simpler HTML than the regular websites, results usually look awesome:</p>
<figure><img src="/ox-hugo/pdf-prot.png"/>
<figure><img src="/images/pdf-prot.png"/>
</figure>
<h3 id="opening-arbitrary-sites">Opening arbitrary sites</h3>
@ -535,7 +535,7 @@
</span></span></code></pre></div><p>Unfortunately, this part doesn&rsquo;t work that well, so we can&rsquo;t just uninstall Firefox or Chromium and browse the web from a PDF viewer.</p>
<p>The most common problem I&rsquo;ve encountered is incorrectly formed pictures, such as <code>.png</code> files without the boundary info. I&rsquo;m sure you&rsquo;ve also come across this if you ever tried to insert a lot of Internet pictures into a LaTeX document.</p>
<p>However, sans the pictures issue, for certain sites like Wikipedia this is usable. For instance, here&rsquo;s how the Emacs page looks:
<img src="/ox-hugo/pdf-emacs.png" alt=""></p>
<img src="/images/pdf-emacs.png" alt=""></p>
<h2 id="youtube-transcripts">YouTube transcripts</h2>
<h3 id="getting-subtitles">Getting subtitles</h3>
<p>Finally, let&rsquo;s get to transcripts.</p>
@ -630,7 +630,7 @@
</span></span><span style="display:flex;"><span> (<span style="color:#008000">setq-local</span> <span style="color:#19177c">subed-mpv-video-file</span> (<span style="color:#19177c">elfeed-entry-link</span> <span style="color:#19177c">entry</span>))
</span></span><span style="display:flex;"><span> (<span style="color:#19177c">subed-mpv--play</span> <span style="color:#19177c">subed-mpv-video-file</span>))
</span></span></code></pre></div><p>And here&rsquo;s how it looks when used (the video on the screenshot is <a href="https://www.youtube.com/watch?v=qjAIXCmhCQQ">this System Crafters&rsquo; stream</a>):
<img src="/ox-hugo/pdf-subed.png" alt=""></p>
<img src="/images/pdf-subed.png" alt=""></p>
<p>Keep in mind that this function has to be launched inside the buffer opened by the <code>my/elfeed-youtube-subtitles</code> function.</p>
</div>

View file

@ -450,7 +450,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000&#34;&gt;:overwrite&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;current-prefix-arg&lt;/span&gt;)))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the &lt;code&gt;my/elfeed-show-rdrview-html&lt;/code&gt; variable is bound and true, then the content in this buffer was retrieved via &lt;code&gt;rdrview&lt;/code&gt;, so we&amp;rsquo;ll use that instead of the output of &lt;code&gt;elfeed-deref&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now we can open elfeed entries in a PDF viewer, which I find much nicer to read. Given that RSS feeds generally ship with simpler HTML than the regular websites, results usually look awesome:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/pdf-prot.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/pdf-prot.png&#34;/&gt;
&lt;/figure&gt;
&lt;h3 id=&#34;opening-arbitrary-sites&#34;&gt;Opening arbitrary sites&lt;/h3&gt;
@ -489,7 +489,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Unfortunately, this part doesn&amp;rsquo;t work that well, so we can&amp;rsquo;t just uninstall Firefox or Chromium and browse the web from a PDF viewer.&lt;/p&gt;
&lt;p&gt;The most common problem I&amp;rsquo;ve encountered is incorrectly formed pictures, such as &lt;code&gt;.png&lt;/code&gt; files without the boundary info. I&amp;rsquo;m sure you&amp;rsquo;ve also come across this if you ever tried to insert a lot of Internet pictures into a LaTeX document.&lt;/p&gt;
&lt;p&gt;However, sans the pictures issue, for certain sites like Wikipedia this is usable. For instance, here&amp;rsquo;s how the Emacs page looks:
&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/pdf-emacs.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;img src=&#34;https://sqrtminusone.xyz/images/pdf-emacs.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;youtube-transcripts&#34;&gt;YouTube transcripts&lt;/h2&gt;
&lt;h3 id=&#34;getting-subtitles&#34;&gt;Getting subtitles&lt;/h3&gt;
&lt;p&gt;Finally, let&amp;rsquo;s get to transcripts.&lt;/p&gt;
@ -584,7 +584,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; (&lt;span style=&#34;color:#008000&#34;&gt;setq-local&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;subed-mpv-video-file&lt;/span&gt; (&lt;span style=&#34;color:#19177c&#34;&gt;elfeed-entry-link&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;entry&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; (&lt;span style=&#34;color:#19177c&#34;&gt;subed-mpv--play&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;subed-mpv-video-file&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And here&amp;rsquo;s how it looks when used (the video on the screenshot is &lt;a href=&#34;https://www.youtube.com/watch?v=qjAIXCmhCQQ&#34;&gt;this System Crafters&amp;rsquo; stream&lt;/a&gt;):
&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/pdf-subed.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;img src=&#34;https://sqrtminusone.xyz/images/pdf-subed.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Keep in mind that this function has to be launched inside the buffer opened by the &lt;code&gt;my/elfeed-youtube-subtitles&lt;/code&gt; function.&lt;/p&gt;
</content>
@ -846,7 +846,7 @@
&lt;h2 id=&#34;polybar&#34;&gt;Polybar&lt;/h2&gt;
&lt;p&gt;Now, the most &lt;del&gt;crazy&lt;/del&gt; advanced case I&amp;rsquo;ve come up with so far.&lt;/p&gt;
&lt;p&gt;Basically, here is how my &lt;a href=&#34;https://github.com/polybar/polybar&#34;&gt;polybar&lt;/a&gt; currently looks:
&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/literate--polybar.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;img src=&#34;https://sqrtminusone.xyz/images/literate--polybar.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;It has:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;colors from the general color theme;&lt;/li&gt;
@ -1204,8 +1204,8 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;workspaces 2 and 3 on the machine with hostname &amp;ldquo;indigo&amp;rdquo; will be displayed on the monitor &lt;code&gt;DVI-D-0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;However, some features, common in other tiling WMs, are missing in EXWM out of the box, namely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a command to &lt;a href=&#34;https://i3wm.org/docs/userguide.html#%5Ffocusing%5Fmoving%5Fcontainers&#34;&gt;switch to another monitor&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;a command to &lt;a href=&#34;https://i3wm.org/docs/userguide.html#move%5Fto%5Foutputs&#34;&gt;move the current workspace to another monitor&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;a command to &lt;a href=&#34;https://i3wm.org/docs/userguide.html#_focusing_moving_containers&#34;&gt;switch to another monitor&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;a command to &lt;a href=&#34;https://i3wm.org/docs/userguide.html#move_to_outputs&#34;&gt;move the current workspace to another monitor&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;using the same commands to switch between windows and monitors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&amp;rsquo;s my take on implementing them.&lt;/p&gt;
@ -1264,7 +1264,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;switch-to-another-monitor&#34;&gt;Switch to another monitor&lt;/h3&gt;
&lt;p&gt;With the functions from the previous two sections, we can implement switching to another monitor by switching to the most recently used workspace on that monitor.&lt;/p&gt;
&lt;video controls width=&#34;100%&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/ox-hugo/exwm-workspace-switch.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/videos/exwm-workspace-switch.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;p&gt;One caveat here is that on the startup the &lt;code&gt;my/exwm-last-workspaces&lt;/code&gt; variable won&amp;rsquo;t have any values from other monitor(s), so this list is concatenated with the list of available workspace indices.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;defun&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;my/exwm-switch-to-other-monitor&lt;/span&gt; (&lt;span style=&#34;color:#008000&#34;&gt;&amp;amp;optional&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;dir&lt;/span&gt;)
@ -1286,7 +1286,7 @@
&lt;h3 id=&#34;move-the-workspace-to-another-monitor&#34;&gt;Move the workspace to another monitor&lt;/h3&gt;
&lt;p&gt;Now, moving the workspace to another monitor.&lt;/p&gt;
&lt;video controls width=&#34;100%&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/ox-hugo/exwm-workspace-move.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/videos/exwm-workspace-move.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;p&gt;This is actually quite easy to pull off - one just has to update &lt;code&gt;exwm-randr-workspace-monitor-plist&lt;/code&gt; accordingly and run &lt;code&gt;exwm-randr-refresh&lt;/code&gt;. I just add another check there because I don&amp;rsquo;t want some monitor to remain without workspaces at all.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;defun&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;my/exwm-workspace-switch-monitor&lt;/span&gt; ()
@ -1389,7 +1389,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;resizing-windows&#34;&gt;Resizing windows&lt;/h3&gt;
&lt;p&gt;I find this odd that there are different commands to resize tiling and floating windows.&lt;/p&gt;
&lt;video controls width=&#34;100%&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/ox-hugo/exwm-resize-hydra.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/videos/exwm-resize-hydra.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;p&gt;So let&amp;rsquo;s define one command to perform both resizes depending on the context:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#008000&#34;&gt;setq&lt;/span&gt; &lt;span style=&#34;color:#19177c&#34;&gt;my/exwm-resize-value&lt;/span&gt; &lt;span style=&#34;color:#666&#34;&gt;5&lt;/span&gt;)
@ -1501,7 +1501,7 @@
&lt;p&gt;One common point of criticism of i3 is that it is not extensible enough, especially compared to WMs that are configured in an actual programing language, like the mentioned XMonad, &lt;a href=&#34;http://www.qtile.org/&#34;&gt;Qtile&lt;/a&gt;, &lt;a href=&#34;https://awesomewm.org/&#34;&gt;Awesome&lt;/a&gt;, etc. But I think i3&amp;rsquo;s extensibility is underappreciated, although the contents of this article may lie closer to the limits of how far one can go there.&lt;/p&gt;
&lt;p&gt;Here is a small demo of how it currently works:&lt;/p&gt;
&lt;video controls width=&#34;100%&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/ox-hugo/i3-emacs-demo.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;source src=&#34;https://sqrtminusone.xyz/static/videos/i3-emacs-demo.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;h2 id=&#34;emacs-integration&#34;&gt;Emacs integration&lt;/h2&gt;
&lt;p&gt;What I&amp;rsquo;m trying to do is actually quite simple, so I&amp;rsquo;m somewhat surprised I didn&amp;rsquo;t find anything similar on the Internet. But I didn&amp;rsquo;t look too hard.&lt;/p&gt;
@ -1697,7 +1697,7 @@
<guid>https://sqrtminusone.xyz/posts/2021-09-07-emms/</guid>
<content type="html">
&lt;h2 id=&#34;intro&#34;&gt;Intro&lt;/h2&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/emms-screenshot.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/emms/emms-screenshot.png&#34;/&gt;
&lt;/figure&gt;
&lt;p&gt;This is the current state of my quest to live in Emacs, at least in part of reading RSS and music.&lt;/p&gt;
@ -1936,7 +1936,7 @@
<guid>https://sqrtminusone.xyz/posts/2021-05-01-org-python/</guid>
<content type="html">
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/org-python-screenshot.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/org-python/org-python-screenshot.png&#34;/&gt;
&lt;/figure&gt;
&lt;h2 id=&#34;why&#34;&gt;Why?&lt;/h2&gt;
@ -2275,7 +2275,7 @@
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_CLASS: org-plain-extarticle
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_CLASS_OPTIONS: [a4paper, 14pt]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;14pt size is required by certain state standards of ours for some reason.&lt;/p&gt;
&lt;p&gt;After which you can put whatever you want in the preamble with &lt;code&gt;LATEX_HEADER&lt;/code&gt;. My workflow with LaTeX is to write a bunch of &lt;code&gt;.sty&lt;/code&gt; files beforehand and import the necessary ones in the preamble. &lt;a href=&#34;https://github.com/SqrtMinusOne/LaTeX%5Ftemplates&#34;&gt;Here&lt;/a&gt; is the repo with these files, although quite predictably, it&amp;rsquo;s a mess. At any rate, I have to write something like the following in the target Org file:&lt;/p&gt;
&lt;p&gt;After which you can put whatever you want in the preamble with &lt;code&gt;LATEX_HEADER&lt;/code&gt;. My workflow with LaTeX is to write a bunch of &lt;code&gt;.sty&lt;/code&gt; files beforehand and import the necessary ones in the preamble. &lt;a href=&#34;https://github.com/SqrtMinusOne/LaTeX_templates&#34;&gt;Here&lt;/a&gt; is the repo with these files, although quite predictably, it&amp;rsquo;s a mess. At any rate, I have to write something like the following in the target Org file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_HEADER: \usepackage{styles/generalPreamble}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_HEADER: \usepackage{styles/reportFormat}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#+LATEX_HEADER: \usepackage{styles/mintedSourceCode}
@ -2305,10 +2305,10 @@
&lt;p&gt;Any classical IMAP/SMTP client is hard to use in my case, because a message with multiple labels is copied to IMAP folders for each of the label plus the inbox folder, and the copies look like different messages from the client-side. For example, a message can be read in one label and unread in another.&lt;/p&gt;
&lt;p&gt;For a few years, my solution was &lt;a href=&#34;https://getmailspring.com/&#34;&gt;Mailspring&lt;/a&gt;, which provides first-class support for labels. However, it has a feature to deploy &lt;a href=&#34;https://www.bbc.com/news/technology-56071437&#34;&gt;spy pixels&lt;/a&gt; on emails (and offers no protection from them, obviously), the client is Electron-based with a mouse-driven interface, and the sync engine was closed-source at the time.&lt;/p&gt;
&lt;p&gt;So, I found an alternative in Emacs+notmuch+lieer and ditched one more proprietary app (the last big one I can&amp;rsquo;t let go of is DataGrip).&lt;/p&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/main.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/gmail/main.png&#34;/&gt;
&lt;/figure&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/mail.png&#34;/&gt;
&lt;figure&gt;&lt;img src=&#34;https://sqrtminusone.xyz/images/gmail/mail.png&#34;/&gt;
&lt;/figure&gt;
&lt;p&gt;Notmuch&amp;rsquo;s tags are just as advanced as Gmail&amp;rsquo;s labels, so I have basically the same mail structure accessible from Emacs, Gmail Android client and even the web UI when I don&amp;rsquo;t have access to the first two.&lt;/p&gt;
@ -2334,6 +2334,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install .
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After which we may check if the &lt;code&gt;gmi&lt;/code&gt; executable is available:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;which gmi
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/home/pavel/Programs/miniconda3/envs/mail/bin/gmi
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;notmuch&#34;&gt;Notmuch&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://notmuchmail.org/&#34;&gt;Notmuch&lt;/a&gt; is present in most of the package repositories, so you can install it with your package manager, which is &lt;code&gt;pacman&lt;/code&gt; in my case.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S notmuch
@ -2426,7 +2427,7 @@
&lt;p&gt;Authorization parameters will be saved to your &lt;a href=&#34;https://www.emacswiki.org/emacs/GnusAuthinfo&#34;&gt;authinfo&lt;/a&gt; file. If you didn&amp;rsquo;t have one, the plaintext &lt;code&gt;.authinfo&lt;/code&gt; will be created, so it&amp;rsquo;s reasonable to encrypt it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000&#34;&gt;cd&lt;/span&gt; ~
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg -o .authinfo.gpg -c --cipher-algo AES256 .authinfo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, if you plan to use multiple accounts with different SMTP servers, it makes more sense to use something like &lt;a href=&#34;https://marlam.de/msmtp/msmtp.html&#34;&gt;MSMTP&lt;/a&gt; to manage multiple accounts. Here are a couple of examples (&lt;a href=&#34;https://www.reddit.com/r/emacs/comments/9piml5/a%5Ffew%5Fquick%5Femacsnotmuch%5Fquestions/e83zcck?utm%5Fsource=share&amp;amp;utm%5Fmedium=web2x&amp;amp;context=3&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://www.reddit.com/r/emacs/comments/9piml5/a%5Ffew%5Fquick%5Femacsnotmuch%5Fquestions/e84otah?utm%5Fsource=share&amp;amp;utm%5Fmedium=web2x&amp;amp;context=3&#34;&gt;2&lt;/a&gt;) how to do that.&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, if you plan to use multiple accounts with different SMTP servers, it makes more sense to use something like &lt;a href=&#34;https://marlam.de/msmtp/msmtp.html&#34;&gt;MSMTP&lt;/a&gt; to manage multiple accounts. Here are a couple of examples (&lt;a href=&#34;https://www.reddit.com/r/emacs/comments/9piml5/a_few_quick_emacsnotmuch_questions/e83zcck?utm_source=share&amp;amp;utm_medium=web2x&amp;amp;context=3&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://www.reddit.com/r/emacs/comments/9piml5/a_few_quick_emacsnotmuch_questions/e84otah?utm_source=share&amp;amp;utm_medium=web2x&amp;amp;context=3&#34;&gt;2&lt;/a&gt;) how to do that.&lt;/p&gt;
&lt;p&gt;Another alternative for Gmail is to use &lt;a href=&#34;https://github.com/gauteh/lieer/wiki/GNU-Emacs-and-Lieer&#34;&gt;lieer as sendmail program&lt;/a&gt;. That may make sense if you don&amp;rsquo;t want to enable IMAP and SMTP on your account.&lt;/p&gt;
&lt;p&gt;There are also &lt;a href=&#34;https://notmuchmail.org/emacstips/#index13h2&#34;&gt;a bunch of ways&lt;/a&gt; to set up address completion if the built-in completion based on notmuch database does not suffice.&lt;/p&gt;
&lt;p&gt;I also use &lt;a href=&#34;https://github.com/mhayashi1120/Emacs-langtool&#34;&gt;LanguageTool for Emacs&lt;/a&gt; to do a spell checking of important emails (integrations like that really make Emacs shine). For some reason, developers don&amp;rsquo;t give a link to download the server on the frontpage, so &lt;a href=&#34;https://dev.languagetool.org/http-server&#34;&gt;here it is&lt;/a&gt;. And here is the relevant part of my Emacs config:&lt;/p&gt;
@ -2526,7 +2527,7 @@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The script is launched with cron every 5 minutes:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*/5 * * * * bash /home/pavel/bin/scripts/check-email
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s how the notification looks like:
&lt;img src=&#34;https://sqrtminusone.xyz/ox-hugo/notification.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;img src=&#34;https://sqrtminusone.xyz/images/gmail/notification.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;caveats&#34;&gt;Caveats&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/gauteh/lieer#caveats&#34;&gt;lieer&lt;/a&gt; has an extensive list of caveats concerning Gmail API&lt;/li&gt;

View file

@ -58,6 +58,8 @@
</url><url>
<loc>https://sqrtminusone.xyz/posts/hello-world/</loc>
<lastmod>2021-02-01T00:00:00+00:00</lastmod>
</url><url>
<loc>https://sqrtminusone.xyz/configs/readme/</loc>
</url><url>
<loc>https://sqrtminusone.xyz/categories/</loc>
</url><url>
@ -72,7 +74,5 @@
<loc>https://sqrtminusone.xyz/configs/guix/</loc>
</url><url>
<loc>https://sqrtminusone.xyz/configs/mail/</loc>
</url><url>
<loc>https://sqrtminusone.xyz/configs/readme/</loc>
</url>
</urlset>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 68 KiB