<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>linux &amp;mdash; musicmatzes blog</title>
    <link>https://beyermatthias.de/tag:linux</link>
    <description></description>
    <pubDate>Mon, 12 Oct 2026 05:29:31 +0200</pubDate>
    <item>
      <title>Switching to KDE</title>
      <link>https://beyermatthias.de/switching-to-kde</link>
      <description>&lt;![CDATA[I consider myself a power user.&#xA;I&#39;ve been using Linux exclusively on all my machines (except maybe on my&#xA;Androids, if you do not consider these linuxes) for over ten years.&#xA;Most of the time, I used i3wm (and some time sway), but I got tired of it about&#xA;two years ago.&#xA;I switched to XFCE. I told myself, I&#39;m living inside a terminal anyways, I use&#xA;mutt for mails, (neo)vim for editing stuff and do not use that many GUI apps&#xA;anyways.&#xA;The browser, of course. And telegram-desktop.&#xA;Recently (about a year ago maybe?), riot-desktop joined the two.&#xA;&#xA;I told myself that XFCE is eye-candy enough for me and performs really nice&#xA;without getting in my way while working in terminals.&#xA;&#xA;Today, I switched my two main devices to KDE Plasma 5. Well, my notebook was&#xA;actually switched yesterday. And because it was such a huge leap in &#34;niceness&#34;,&#xA;I switched my workstation today.&#xA;&#xA;I also switched my email setup to Korganizer with Kmail for mails. I am looking&#xA;forward to see how that performs for me.&#xA;&#xA;I always considered KDE the desktop for Linux. The one, normal users should&#xA;use to get a first impression of Linux. The one, that will be there for &#34;Linux&#xA;on the Desktop&#34; when it gets real. You know what I mean?&#xA;&#xA;I never considered for a power-user setup. Power users use i3wm, awesomeWM,&#xA;sway, ... but not full-blown desktop environments, do they?&#xA;Well, on several occasions I met Kai Uwe, a KDE dev&#xA;from a town not far from the town I grew up in.&#xA;We&#39;ve met on Linux-Days and other Community events. I always was amazed how fast&#xA;KDE was on his machines. I was blown away by the usability.&#xA;But I never really considered switching.&#xA;&#xA;Until today.&#xA;&#xA;Memory usage is where it should be: My desktop uses 3.6GB right now, with&#xA;Cantata (MPD client), Riot-Desktop (Electron!), Telegram, Firefox and Kontact&#xA;open (plus some more terminals and some services running in the background as&#xA;well).&#xA;&#xA;My Notebook was at about 5GB RAM usage with the same apps open and even some&#xA;more stuff running in the background.&#xA;&#xA;After that experience and also that performance on my rather old desktop&#xA;machine, I&#39;m blown away and am willing to invest time into getting to know how&#xA;to be even faster and more productive than I am currently feeling with KDE.&#xA;&#xA;tags: #kde #linux #desktop #software&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I consider myself a power user.
I&#39;ve been using Linux exclusively on all my machines (except maybe on my
Androids, if you do not consider these linuxes) for over ten years.
Most of the time, I used i3wm (and some time sway), but I got tired of it about
two years ago.
I switched to XFCE. I told myself, I&#39;m living inside a terminal anyways, I use
mutt for mails, (neo)vim for editing stuff and do not use that many GUI apps
anyways.
The browser, of course. And telegram-desktop.
Recently (about a year ago maybe?), riot-desktop joined the two.</p>

<p>I told myself that XFCE is eye-candy enough for me and performs really nice
without getting in my way while working in terminals.</p>

<p>Today, I switched my two main devices to KDE Plasma 5. Well, my notebook was
actually switched yesterday. And because it was such a huge leap in “niceness”,
I switched my workstation today.</p>

<p>I also switched my email setup to Korganizer with Kmail for mails. I am looking
forward to see how that performs for me.</p>

<p>I always considered KDE <em>the</em> desktop for Linux. The one, normal users should
use to get a first impression of Linux. The one, that will be there for “Linux
on the Desktop” when it gets real. You know what I mean?</p>

<p>I never considered for a power-user setup. Power users use i3wm, awesomeWM,
sway, ... but not full-blown desktop environments, do they?
Well, on several occasions I met <a href="https://blog.broulik.de/">Kai Uwe</a>, a KDE dev
from a town not far from the town I grew up in.
We&#39;ve met on Linux-Days and other Community events. I always was amazed how fast
KDE was on his machines. I was blown away by the usability.
But I never <em>really</em> considered switching.</p>

<p>Until today.</p>

<p>Memory usage is where it should be: My desktop uses 3.6GB right now, with
Cantata (MPD client), Riot-Desktop (Electron!), Telegram, Firefox and Kontact
open (plus some more terminals and some services running in the background as
well).</p>

<p>My Notebook was at about 5GB RAM usage with the same apps open and even some
more stuff running in the background.</p>

<p>After that experience and also that <em>performance</em> on my rather old desktop
machine, I&#39;m blown away and am willing to invest time into getting to know how
to be even faster and more productive than I am currently feeling with KDE.</p>

<p>tags: <a href="https://beyermatthias.de/tag:kde" class="hashtag"><span>#</span><span class="p-category">kde</span></a> <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://beyermatthias.de/tag:desktop" class="hashtag"><span>#</span><span class="p-category">desktop</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/switching-to-kde</guid>
      <pubDate>Sun, 18 Oct 2020 16:40:13 +0200</pubDate>
    </item>
    <item>
      <title>Installing notmuch and muchsync on uberspace</title>
      <link>https://beyermatthias.de/installing-notmuch-and-muchsync-on-uberspace</link>
      <description>&lt;![CDATA[Because I want to use notmuch for my mails and also sync tags between my&#xA;machines, I figured I should install notmuch and muchsync on my uberspace.&#xA;But because centos7 does not have packages and uberspace does not yet provide a&#xA;way to conveniently install packages for a user, I had to compile the world.&#xA;&#xA;Here&#39;s the guide for doing it.&#xA;&#xA;Preface&#xA;&#xA;In the following steps, I will download, unpack and build sources from scratch.&#xA;My download and compile folder will be at $HOME/compile.&#xA;My install folder will be at $HOME/install. I don&#39;t be installing stuff into&#xA;my $HOME directly on the uberspace, because I want to be a bit organized here.&#xA;&#xA;Thus, you might want to adapt your commandline calls.&#xA;&#xA;Obtaining sources&#xA;&#xA;First, you should go and fetch all latest sources for the whole dependency&#xA;chain.&#xA;I will not link to the individual tarballs, you should figure out the links for&#xA;yourself to get the latest and greatest of each project.&#xA;&#xA;Here&#39;s the list of links where you&#39;ll find the code you&#39;ll need to compile:&#xA;&#xA;https://www.samba.org/ftp/talloc/&#xA;https://xapian.org/download&#xA;https://notmuchmail.org/releases/&#xA;http://www.muchsync.org/src/&#xA;https://download.gnome.org/sources/gmime/3.2/&#xA;  (because github release tags or gitlab release tags do not contain ./configure&#xA;  (thanks to gnome developers thinking it might not be necessary to actually&#xA;  include their build toolchain in the repository), you&#39;ll need to use this&#xA;  link).&#xA;https://gnupg.org/ftp/gcrypt/libksba/&#xA;https://www.gnupg.org/download/index.html (gpgme, libgpg-error, libassuan,&#xA;  npth, ntbtls, gnupg)&#xA;&#xA;Configuring the build(s) and building&#xA;&#xA;First of all, execute&#xA;&#xA;mkdir -p $HOME/install/lib/pkgconfig&#xA;export PKGCONFIGPATH=$HOME/install/lib/pkgconfig/:$PKGCONFIGPATH&#xA;&#xA;To make sure the pkg-config utility finds the right package configuration files.&#xA;&#xA;It follows a list of configure calls for the respectice library/binary.&#xA;I hope this list is complete and I didn&#39;t miss anything in the process.&#xA;Feel free to mail-ping me if something is missing.&#xA;&#xA;For all packages that are not listed here, a simple&#xA;&#xA;./configure --prefix=$HOME/install &amp;&amp; make install&#xA;&#xA;did the job. For the following packages, it was not as convenient, but after&#xA;successfully configuring, you can install all of them with a simple `make&#xA;install`.&#xA;&#xA;libassuan&#xA;&#xA;./configure --prefix=$HOME/install \&#xA;    --with-libgpg-error-prefix=$HOME/install/&#xA;&#xA;gpgme&#xA;&#xA;./configure --prefix=$HOME/install \&#xA;    --with-libgpg-error-prefix=$HOME/install \&#xA;    --with-libassuan-prefix=$HOME/install&#xA;&#xA;libksba&#xA;&#xA;./configure --prefix=$HOME/install \&#xA;    --with-libgpg-error-prefix=$HOME/install&#xA;&#xA;gmime&#xA;&#xA;PATH=$HOME/install/bin:$PATH ./configure --prefix=$HOME/install&#xA;&#xA;libgcrypt&#xA;&#xA;./configure --prefix=$HOME/install \&#xA;    --with-libgpg-error-prefix=$HOME/install&#xA;&#xA;ntbtls&#xA;&#xA;./configure --prefix=$HOME/install \&#xA;    --with-libgpg-error-prefix=$HOME/install \&#xA;    --with-libgcrypt-prefix=$HOME/install \&#xA;    --with-ksba-prefix=$HOME/install&#xA;&#xA;gnupg&#xA;&#xA;./configure --prefix=$HOME/install \&#xA;    --with-libgpg-error-prefix=$HOME/install \&#xA;    --with-libgcrypt-prefix=$HOME/install \&#xA;    --with-libassuan-prefix=$HOME/install \&#xA;    --with-ksba-prefix=$HOME/install&#xA;&#xA;notmuch&#xA;&#xA;You might want to open a new shell for the environment variables&#xA;&#xA;export LDLIBRARYPATH=$HOME/install/lib:$LDLIBRARYPATH PATH=$HOME/install/bin:$PATH&#xA;export LDFLAGS=&#34;$LDFLAGS -L$HOME/install/lib/ &#34;&#xA;export CFLAGS=&#34;$CFLAGS -I$HOME/install/include/ -std=c99 &#34;&#xA;export PKGCONFIGPATH=$HOME/install/lib/pkgconfig:$PKGCONFIGPATH&#xA;&#xA;./configure --prefix=$HOME/install \&#xA;    --without-bash-completion \&#xA;    --without-docs \&#xA;    --without-api-docs \&#xA;    --without-emacs \&#xA;    --without-desktop \&#xA;    --without-ruby \&#xA;    --without-zsh-completion&#xA;&#xA;muchsync&#xA;&#xA;You might want to open a new shell for the environment variables&#xA;&#xA;export LDFLAGS=&#34;$LDFLAGS -L$HOME/install/lib/ -Wl,-rpath,$HOME/install/lib/&#34;&#xA;export LDLIBRARYPATH=$HOME/install/lib:$LDLIBRARYPATH&#xA;export CXXFLAGS=&#34;$CXXFLAGS -I$HOME/install/include &#34;&#xA;export PKGCONFIGPATH=$HOME/install/lib/pkgconfig&#xA;&#xA;./configure --prefix=$HOME/install --exec-prefix=$HOME/install&#xA;&#xA;List of versions this guide was written for&#xA;&#xA;This is the (alphabetically sorted) list of stuff I had to compile and install,&#xA;including versions so you can figure whether you have something newer and might&#xA;need to investigate on differences when compiling your stuff:&#xA;&#xA;gmime-3.2.7&#xA;gnupg-2.2.21&#xA;gpgme-1.14.0&#xA;libassuan-2.5.3&#xA;libgcrypt-1.8.6&#xA;libgpg-error-1.38&#xA;libksba-1.4.0&#xA;muchsync-5&#xA;notmuch-0.30&#xA;npth-1.6&#xA;ntbtls-0.1.2&#xA;talloc-2.3.1&#xA;xapian-core-1.4.16&#xA;&#xA;Of course you should update your installation if new versions come out.&#xA;&#xA;Happy compiling.&#xA;&#xA;tags: #uberspace #email #linux&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Because I want to use notmuch for my mails and also sync tags between my
machines, I figured I should install notmuch and muchsync on my uberspace.
But because centos7 does not have packages and uberspace does not yet provide a
way to conveniently install packages for a user, I had to compile the world.</p>

<p>Here&#39;s the guide for doing it.</p>

<h1 id="preface" id="preface">Preface</h1>

<p>In the following steps, I will download, unpack and build sources from scratch.
My download and compile folder will be at <code>$HOME/compile</code>.
My install folder will be at <code>$HOME/install</code>. I don&#39;t be installing stuff into
my $HOME directly on the uberspace, because I want to be a bit organized here.</p>

<p>Thus, you might want to adapt your commandline calls.</p>

<h1 id="obtaining-sources" id="obtaining-sources">Obtaining sources</h1>

<p>First, you should go and fetch all latest sources for the whole dependency
chain.
I will not link to the individual tarballs, you should figure out the links for
yourself to get the latest and greatest of each project.</p>

<p>Here&#39;s the list of links where you&#39;ll find the code you&#39;ll need to compile:</p>
<ul><li><a href="https://www.samba.org/ftp/talloc/">https://www.samba.org/ftp/talloc/</a></li>
<li><a href="https://xapian.org/download">https://xapian.org/download</a></li>
<li><a href="https://notmuchmail.org/releases/">https://notmuchmail.org/releases/</a></li>
<li><a href="http://www.muchsync.org/src/">http://www.muchsync.org/src/</a></li>
<li><a href="https://download.gnome.org/sources/gmime/3.2/">https://download.gnome.org/sources/gmime/3.2/</a>
(because github release tags or gitlab release tags do not contain ./configure
(thanks to gnome developers thinking it might not be necessary to actually
include their build toolchain in the repository), you&#39;ll <em>need</em> to use this
link).</li>
<li><a href="https://gnupg.org/ftp/gcrypt/libksba/">https://gnupg.org/ftp/gcrypt/libksba/</a></li>
<li><a href="https://www.gnupg.org/download/index.html">https://www.gnupg.org/download/index.html</a> (gpgme, libgpg-error, libassuan,
npth, ntbtls, gnupg)</li></ul>

<h1 id="configuring-the-build-s-and-building" id="configuring-the-build-s-and-building">Configuring the build(s) and building</h1>

<p>First of all, execute</p>

<pre><code>mkdir -p $HOME/install/lib/pkgconfig
export PKG_CONFIG_PATH=$HOME/install/lib/pkgconfig/:$PKG_CONFIG_PATH
</code></pre>

<p>To make sure the pkg-config utility finds the right package configuration files.</p>

<p>It follows a list of configure calls for the respectice library/binary.
I <em>hope</em> this list is complete and I didn&#39;t miss anything in the process.
Feel free to mail-ping me if something is missing.</p>

<p>For all packages that are not listed here, a simple</p>

<pre><code>./configure --prefix=$HOME/install &amp;&amp; make install
</code></pre>

<p>did the job. For the following packages, it was not as convenient, but after
successfully configuring, you can install all of them with a simple <code>make
install</code>.</p>

<h2 id="libassuan" id="libassuan">libassuan</h2>

<pre><code>./configure --prefix=$HOME/install \
    --with-libgpg-error-prefix=$HOME/install/
</code></pre>

<h2 id="gpgme" id="gpgme">gpgme</h2>

<pre><code>./configure --prefix=$HOME/install \
    --with-libgpg-error-prefix=$HOME/install \
    --with-libassuan-prefix=$HOME/install
</code></pre>

<h2 id="libksba" id="libksba">libksba</h2>

<pre><code>./configure --prefix=$HOME/install \
    --with-libgpg-error-prefix=$HOME/install
</code></pre>

<h2 id="gmime" id="gmime">gmime</h2>

<pre><code>PATH=$HOME/install/bin:$PATH ./configure --prefix=$HOME/install
</code></pre>

<h2 id="libgcrypt" id="libgcrypt">libgcrypt</h2>

<pre><code>./configure --prefix=$HOME/install \
    --with-libgpg-error-prefix=$HOME/install
</code></pre>

<h2 id="ntbtls" id="ntbtls">ntbtls</h2>

<pre><code>./configure --prefix=$HOME/install \
    --with-libgpg-error-prefix=$HOME/install \
    --with-libgcrypt-prefix=$HOME/install \
    --with-ksba-prefix=$HOME/install
</code></pre>

<h2 id="gnupg" id="gnupg">gnupg</h2>

<pre><code>./configure --prefix=$HOME/install \
    --with-libgpg-error-prefix=$HOME/install \
    --with-libgcrypt-prefix=$HOME/install \
    --with-libassuan-prefix=$HOME/install \
    --with-ksba-prefix=$HOME/install
</code></pre>

<h2 id="notmuch" id="notmuch">notmuch</h2>

<p>You might want to open a new shell for the environment variables</p>

<pre><code>export LD_LIBRARY_PATH=$HOME/install/lib:$LD_LIBRARY_PATH PATH=$HOME/install/bin:$PATH
export LDFLAGS=&#34;$LDFLAGS -L$HOME/install/lib/ &#34;
export CFLAGS=&#34;$CFLAGS -I$HOME/install/include/ -std=c99 &#34;
export PKG_CONFIG_PATH=$HOME/install/lib/pkgconfig:$PKG_CONFIG_PATH

./configure --prefix=$HOME/install \
    --without-bash-completion \
    --without-docs \
    --without-api-docs \
    --without-emacs \
    --without-desktop \
    --without-ruby \
    --without-zsh-completion
</code></pre>

<h2 id="muchsync" id="muchsync">muchsync</h2>

<p>You might want to open a new shell for the environment variables</p>

<pre><code>export LDFLAGS=&#34;$LDFLAGS -L$HOME/install/lib/ -Wl,-rpath,$HOME/install/lib/&#34;
export LD_LIBRARY_PATH=$HOME/install/lib:$LD_LIBRARY_PATH
export CXXFLAGS=&#34;$CXXFLAGS -I$HOME/install/include &#34;
export PKG_CONFIG_PATH=$HOME/install/lib/pkgconfig

./configure --prefix=$HOME/install --exec-prefix=$HOME/install
</code></pre>

<h1 id="list-of-versions-this-guide-was-written-for" id="list-of-versions-this-guide-was-written-for">List of versions this guide was written for</h1>

<p>This is the (alphabetically sorted) list of stuff I had to compile and install,
including versions so you can figure whether you have something newer and might
need to investigate on differences when compiling your stuff:</p>
<ul><li>gmime-3.2.7</li>
<li>gnupg-2.2.21</li>
<li>gpgme-1.14.0</li>
<li>libassuan-2.5.3</li>
<li>libgcrypt-1.8.6</li>
<li>libgpg-error-1.38</li>
<li>libksba-1.4.0</li>
<li>muchsync-5</li>
<li>notmuch-0.30</li>
<li>npth-1.6</li>
<li>ntbtls-0.1.2</li>
<li>talloc-2.3.1</li>
<li>xapian-core-1.4.16</li></ul>

<p>Of course you should update your installation if new versions come out.</p>

<p>Happy compiling.</p>

<p>tags: <a href="https://beyermatthias.de/tag:uberspace" class="hashtag"><span>#</span><span class="p-category">uberspace</span></a> <a href="https://beyermatthias.de/tag:email" class="hashtag"><span>#</span><span class="p-category">email</span></a> <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/installing-notmuch-and-muchsync-on-uberspace</guid>
      <pubDate>Sun, 26 Jul 2020 16:40:11 +0200</pubDate>
    </item>
    <item>
      <title>Why I use Linux</title>
      <link>https://beyermatthias.de/why-i-use-linux</link>
      <description>&lt;![CDATA[I&#39;m not sure whether I wrote an article like this before.&#xA;Either way, the&#xA;Why I use Linux Project&#xA;is a nice opportunity to write (again?) about this topic.&#xA;&#xA;History&#xA;&#xA;First of all, some history. I was introduced to &#34;the other operating system&#34;&#xA;in grade 11 by a close friend of mine.&#xA;At the time, I didn&#39;t know a thing about computers. I just graduated middle&#xA;school (&#34;Realschule&#34; in Germany) and started high school (&#34;Gymnasium&#34; in&#xA;Germany) and made new friends.&#xA;My friend showed me his notebook, which was running Ubuntu Gnome 09.04 or&#xA;something like that, and I was blown away by the fact that there was something&#xA;else besides Microsoft Windows - and one also got it for free (as in beer).&#xA;&#xA;Soon, I started with Kubuntu,... KDE 3 was amazing to me.&#xA;Maybe half a year after my friend suggested, because I was only using terminal&#xA;applications by that time - learning vim and so on - that I should try&#xA;Archlinux.&#xA;So Archlinux it was.&#xA;&#xA;In 2015 I switched to NixOS, using i3 as window manager and was a Linux-only&#xA;guy.&#xA;&#xA;Today I use XFCE on NixOS and couldn&#39;t be happier. All my machines work&#xA;perfectly well.&#xA;&#xA;The reasons&#xA;&#xA;Now that you know my history with Linux, let me give you some reasons why I&#xA;use Linux today:&#xA;&#xA;It works.&#xA;   Sounds strange, but for me this is perfectly reasonable: I&#39;ve become a&#xA;   pragmatist - and because my setup, my machines and my workflow just suits&#xA;   me perfectly well, I absolutely have no reason to switch operating systems.&#xA;It is fast.&#xA;   Just today I had the opportunity to compare my workstation to the&#xA;   workstation of someone else running Windows 7. The workstations are&#xA;   approximately the same (so not handheld vs. datacenter): AMD 8 core&#xA;   processor with 16GB RAM on my side vs Intel i7 4-Core + Hyperthreading with&#xA;   16GB on the other side. Tell you what? Mine is much faster with&#xA;   everything. From loading websites, loading applications, ... everything&#xA;   is just smooth and performs really well. Of course this is not a&#xA;   scientific approach in measuring and comparing these machines... but my&#xA;   point is not that my machine is faster, my point is: My machine is fast.&#xA;   My second machine, a Lenovo Thinkpad X220, is fast as hell as well - I&#xA;   never experienced any lagging or something the like.&#xA;I know what is going on in my machine.&#xA;   With Linux under the hood, I know what is running on my machine. With free&#xA;   (as in freedom) software, I actually can read what is going on.&#xA;   How many times have Windows users asked my why some application does not&#xA;   work as intended... How many times have I replied &#34;Wait, I will check the&#xA;   Sourcecode on what it does... Oh, wait, you&#39;re running proprietary&#xA;   Software? Well... not my problem then, is it?&#34; (yes, I&#39;m a bit of a jerk in&#xA;   that regard).&#xA;I can configure how something should work!&#xA;   If I don&#39;t like how my menu works, how switching windows works or on which&#xA;   screen an application appears when starting it... I can change it!&#xA;   Some time ago someone complained that the &#34;Print&#34; dialog on his window&#xA;   machine always opens on the wrong screen. That&#39;s a problem I&#39;ve never&#xA;   experienced with Linux or Linux-running machines. Just configure it how it&#xA;   should work - and then it does that!&#xA;If I don&#39;t like something, I can use something else!&#xA;   Well, if you purchase software and you don&#39;t like it, you cannot return it.&#xA;   Sometimes there are trial versions and that helps a lot - but what if you&#xA;   don&#39;t like the UI your operating system ships? Well, for me that is&#xA;   &#34;uninstall XFCE, install KDE&#34; ... ready to go, don&#39;t even need to reboot.&#xA;I can make it look as nerdy or as hipster-like as I want.&#xA;   Customizing a desktop environment is not one of my favourite ideas of how&#xA;   to spend an evening. But I could do it if I would like to.&#xA;I can adapt it to my workflow - I don&#39;t have to adapt my workflow to it.&#xA;   I&#39;m a heavy user of keybindings. And I love having vim-bindings in my&#xA;   desktop environment, in my bash, in my tmux and in my vim (of course).&#xA;   I can configure that! Hell yeah, that&#39;s the power of free software! I can&#xA;   make it behave like I want to!&#xA;I don&#39;t have to rely on a company to fix their bugs! I can do it myself if&#xA;   I need to. Or I can pay someone to fix them!&#xA;It is free as in freedom and as in beer. For me, as a poor student, both&#xA;   count equally. I love to have free (as in freedom) software at my hands I&#xA;   can mess with. But it is also important that I can use it for free (as in&#xA;   beer). My friends at university pay hundrets of bucks for their&#xA;   Software,... I can use that money to do something else,... for example&#xA;   buying a&#xA;   camera and start learning photography!&#xA;   And because of the&#xA;   free (as in beer) image processing software,&#xA;   I can even post-process the images without purchasing expensive software for&#xA;   it!&#xA;I am a programmer.&#xA;   Unix (or in this case Linux) is my IDE!&#xA;   I&#39;m also a techie and Linux is my playground.&#xA;&#xA;Wanna try?&#xA;&#xA;So, there are some good reasons for using Linux.&#xA;If you want to try using Linux, go ahead with some of the beginner-friendly&#xA;distros like&#xA;Linux Mint&#xA;Ubuntu Mate&#xA;or&#xA;Fedora KDE - and remember that you can&#xA;make each of them look like the other - because with Linux, you have the&#xA;choice!&#xA;&#xA;tags:  #linux#&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I&#39;m not sure whether I wrote an article like this before.
Either way, the
<a href="https://www.youtube.com/watch?v=yzIyuMFVEIg">Why I use Linux Project</a>
is a nice opportunity to write (again?) about this topic.</p>

<h1 id="history" id="history">History</h1>

<p>First of all, some history. I was introduced to “the other operating system”
in grade 11 by a close friend of mine.
At the time, I didn&#39;t know a thing about computers. I just graduated middle
school (“Realschule” in Germany) and started high school (“Gymnasium” in
Germany) and made new friends.
My friend showed me his notebook, which was running Ubuntu Gnome 09.04 or
something like that, and I was blown away by the fact that there was something
else besides Microsoft Windows – and one also got it for free (as in beer).</p>

<p>Soon, I started with Kubuntu,... KDE 3 was amazing to me.
Maybe half a year after my friend suggested, because I was only using terminal
applications by that time – learning vim and so on – that I should try
Archlinux.
So Archlinux it was.</p>

<p>In 2015 I switched to NixOS, using i3 as window manager and was a Linux-only
guy.</p>

<p>Today I use XFCE on NixOS and couldn&#39;t be happier. All my machines work
perfectly well.</p>

<h1 id="the-reasons" id="the-reasons">The reasons</h1>

<p>Now that you know my history with Linux, let me give you some reasons why I
use Linux <em>today</em>:</p>
<ol><li>It works.
Sounds strange, but for me this is perfectly reasonable: I&#39;ve become a
pragmatist – and because my setup, my machines and my workflow just suits
me perfectly well, I absolutely have no reason to switch operating systems.</li>
<li>It is fast.
Just today I had the opportunity to compare my workstation to the
workstation of someone else running Windows 7. The workstations are
<em>approximately</em> the same (so not handheld vs. datacenter): AMD 8 core
processor with 16GB RAM on my side vs Intel i7 4-Core + Hyperthreading with
16GB on the other side. Tell you what? Mine is <em>much</em> faster with
<em>everything</em>. From loading websites, loading applications, ... everything
is just smooth and performs really well. Of course this is not a
scientific approach in measuring and comparing these machines... but my
point is not that my machine is faster, my point is: My machine is fast.
My second machine, a Lenovo Thinkpad X220, is fast as hell as well – I
never experienced any lagging or something the like.</li>
<li>I know what is going on in my machine.
With Linux under the hood, I know what is running on my machine. With free
(as in freedom) software, I actually can <em>read</em> what is going on.
How many times have Windows users asked my why some application does not
work as intended... How many times have I replied “Wait, I will check the
Sourcecode on what it does... Oh, wait, you&#39;re running proprietary
Software? Well... not my problem then, is it?” (yes, I&#39;m a bit of a jerk in
that regard).</li>
<li>I can configure how something should work!
If I don&#39;t like how my menu works, how switching windows works or on which
screen an application appears when starting it... I can change it!
Some time ago someone complained that the “Print” dialog on his window
machine always opens on the wrong screen. That&#39;s a problem I&#39;ve never
experienced with Linux or Linux-running machines. Just configure it how it
should work – and then it does that!</li>
<li>If I don&#39;t like something, I can use something else!
Well, if you purchase software and you don&#39;t like it, you cannot return it.
Sometimes there are trial versions and that helps a lot – but what if you
don&#39;t like the UI your operating system ships? Well, for me that is
“uninstall XFCE, install KDE” ... ready to go, don&#39;t even need to reboot.</li>
<li>I can make it look as nerdy or as hipster-like as <em>I</em> want.
Customizing a desktop environment is not one of my favourite ideas of how
to spend an evening. But I <em>could</em> do it if I would like to.</li>
<li>I can adapt it to my workflow – I don&#39;t have to adapt my workflow to it.
I&#39;m a heavy user of keybindings. And I love having vim-bindings in my
desktop environment, in my bash, in my tmux and in my vim (of course).
I can configure that! Hell yeah, that&#39;s the power of free software! I can
make it behave like I want to!</li>
<li>I don&#39;t have to rely on a company to fix their bugs! I can do it myself if
I need to. Or I can pay someone to fix them!</li>
<li>It is free as in freedom and as in beer. For me, as a poor student, both
count equally. I love to have free (as in freedom) software at my hands I
can mess with. But it is also important that I can use it for free (as in
beer). My friends at university pay hundrets of bucks for their
Software,... I can use that money to do something else,... for example
buying a
<a href="https://beyermatthias.de/img/">camera and start learning photography</a>!
And because of the
<a href="https://www.darktable.org/">free (as in beer) image processing software</a>,
I can even post-process the images without purchasing expensive software for
it!</li>
<li>I am a programmer.
<a href="https://sanctum.geek.nz/arabesque/series/unix-as-ide/">Unix (or in this case Linux) is my IDE</a>!
I&#39;m also a techie and Linux is my playground.</li></ol>

<h1 id="wanna-try" id="wanna-try">Wanna try?</h1>

<p>So, there are some good reasons for using Linux.
If you want to try using Linux, go ahead with some of the beginner-friendly
distros like
<a href="https://linuxmint.com/">Linux Mint</a>
<a href="https://ubuntu-mate.org/">Ubuntu Mate</a>
or
<a href="https://spins.fedoraproject.org/kde/">Fedora KDE</a> – and remember that you can
make each of them <em>look</em> like the other – because with Linux, <em>you</em> have the
choice!</p>

<p>tags:  <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a>#</p>
]]></content:encoded>
      <guid>https://beyermatthias.de/why-i-use-linux</guid>
      <pubDate>Mon, 20 Nov 2017 16:38:26 +0100</pubDate>
    </item>
    <item>
      <title>Please KDE, make your config syncable!</title>
      <link>https://beyermatthias.de/please-kde-make-your-config-syncable</link>
      <description>&lt;![CDATA[This article is a cry for a feature which is long overdue in KDE, in my humble&#xA;opinion: Syncable, user readable (as in plain-text) configuration files.&#xA;&#xA;But let me start explaining where I come from.&#xA;&#xA;I started with Linux when I was 17 years old. At the time I ran an Kubuntu&#xA;9.04 (if I remember correctly) with KDE 3. I disliked Gnome because it&#xA;looked silly to me (no offense, Gnome or Gnome people). So it was simply&#xA;aesthetics which made me use KDE. Before switching to Linux I had only&#xA;experienced the cruel world of Microsoft Windows, XP at the time. When I got a&#xA;new Notebook for my Birthday, I got Vista and two days later I had this Linux&#xA;thing installed (which friends of mine kept talking about). Naturally, I was&#xA;blown away by it.&#xA;&#xA;After some time I got rather comfortable using this black box with the green&#xA;text on it - the terminal finally had me!&#xA;Soon, I launched a full blown KDE 3 (themed hackerlike in dark colors) to&#xA;start a few terminals, open vim and hack away. Then, the same friend who&#xA;suggested Linux told me about &#34;tiling window managers&#34;. wmii it was shortly&#xA;after.&#xA;&#xA;A long journey began. After some troubles with Ubuntu 12.04 I switched to&#xA;Archlinux, later from wmii to dwm and after that to i3 which I kept for&#xA;a few years.&#xA;&#xA;In 2015 I learned about NixOS, switched to it at the beginning of 2016 and in&#xA;late 2016 I reevaluated my desktop and settled with XFCE.&#xA;&#xA;And here&#39;s the thing: I wanted KDE, but it lacked one missing critical&#xA;feature: Beeing able to sync its configuration between my machines.&#xA;&#xA;I own a desktop machine with three 1080p Monitors and two Notebooks - a&#xA;Thinkpad X220 and an old Toshiba Satellite (barely used), if that matters at&#xA;all.&#xA;&#xA;There are things in the KDE configuration files which shouldn&#39;t be there,&#xA;mainly state information and temporary values, making the whole thing a pain&#xA;in the ass if you want to git add your configuration files to git push&#xA;them to your repository somewhere in the web and git pull it on another&#xA;machine.&#xA;&#xA;Apparently the story is not that much better with XFCE, but at least some&#xA;configuration files (like keyboard shortcuts, window decoration configuration&#xA;and menu-bar configuration) can be git added and synced between machines.&#xA;And it works for me, even with two so different machines.&#xA;Some things have to be re-done on each machine, but the effort is pretty low.&#xA;&#xA;But with KDE (I tried Plasma 5), it was pure PITA. Not a single configuration&#xA;file was untouched, reordering values, putting state information in there and&#xA;so on and so forth.&#xA;&#xA;And I am rather amazed with KDE and really want to play with it, because I&#xA;think (and that&#39;s not just an attempt to kiss up to you KDE guys) that KDE is&#xA;the future of Linux on the desktop! Maybe it is not for the Hacker kid from&#xA;next door, but for the normal Linux User, like my Mom, your Sister or the old&#xA;non-techy guy from next door, KDE is simple enough to understand and powerful&#xA;enough to get stuff done efficiently without getting in your way too much.&#xA;&#xA;So here&#39;s my request:&#xA;&#xA;Please, KDE Project, make your configuration files human readable,&#xA;editor-friendly and syncable (via tools like git). That means that there are&#xA;no temporary values and no state information in the configuration files.&#xA;That means that configuration files do not get shuffled when a user alters a&#xA;configuration via a GUI tool. That means that the format of the configuration&#xA;files do not get automatically changed.&#xA;&#xA;The benefits are clear, and there are no drawbacks for KDE as a project (as&#xA;far as I can see) because parsing and processing the configuration files will&#xA;be done either way. Maybe it even reduces the complexity of some things in&#xA;your codebase?&#xA;&#xA;---&#xA;&#xA;A word on &#34;why don&#39;t you submit this to the KDE project as a request&#34;: I am&#xA;not involved with KDE at all. I don&#39;t even know where the documentation, bug&#xA;tracker, mailinglist(s), ... are located. I don&#39;t know where to file these&#xA;things, whether I have to register at some forum or whatever.&#xA;&#xA;If someone could point me to a place where nice people will discuss these&#xA;things with me, feel free [to send me an email and guide me to this&#xA;place](mailto://mail@beyermatthias.de)!&#xA;&#xA;tags:  #open-source #software #tools #git #desktop #linux&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>This article is a cry for a feature which is long overdue in KDE, in my humble
opinion: Syncable, user readable (as in plain-text) configuration files.</p>

<p>But let me start explaining where I come from.</p>

<p>I started with Linux when I was 17 years old. At the time I ran an Kubuntu
9.04 (if I remember correctly) with KDE 3. I disliked Gnome because it
<em>looked silly to me</em> (no offense, Gnome or Gnome people). So it was simply
aesthetics which made me use KDE. Before switching to Linux I had only
experienced the cruel world of Microsoft Windows, XP at the time. When I got a
new Notebook for my Birthday, I got Vista and two days later I had this Linux
thing installed (which friends of mine kept talking about). Naturally, I was
blown away by it.</p>

<p>After some time I got rather comfortable using this black box with the green
text on it – the terminal finally had me!
Soon, I launched a full blown KDE 3 (themed hackerlike in dark colors) to
start a few terminals, open vim and hack away. Then, the same friend who
suggested Linux told me about “tiling window managers”. <code>wmii</code> it was shortly
after.</p>

<p>A long journey began. After some troubles with Ubuntu 12.04 I switched to
Archlinux, later from <code>wmii</code> to <code>dwm</code> and after that to <code>i3</code> which I kept for
a few years.</p>

<p>In 2015 I learned about NixOS, switched to it at the beginning of 2016 and in
late 2016 I reevaluated my desktop and settled with XFCE.</p>

<p>And here&#39;s the thing: I wanted KDE, but it lacked <em>one missing critical
feature</em>: Beeing able to sync its configuration between my machines.</p>

<p>I own a desktop machine with three 1080p Monitors and two Notebooks – a
Thinkpad X220 and an old Toshiba Satellite (barely used), if that matters at
all.</p>

<p>There are things in the KDE configuration files which shouldn&#39;t be there,
mainly state information and temporary values, making the whole thing a pain
in the ass if you want to <code>git add</code> your configuration files to <code>git push</code>
them to your repository somewhere in the web and <code>git pull</code> it on another
machine.</p>

<p>Apparently the story is not <em>that</em> much better with XFCE, but at least <em>some</em>
configuration files (like keyboard shortcuts, window decoration configuration
and menu-bar configuration) can be <code>git add</code>ed and synced between machines.
And it works for me, even with two so different machines.
Some things have to be re-done on each machine, but the effort is pretty low.</p>

<p>But with KDE (I tried Plasma 5), it was pure PITA. Not a single configuration
file was untouched, reordering values, putting state information in there and
so on and so forth.</p>

<p>And I am rather amazed with KDE and really want to play with it, because I
think (and that&#39;s not just an attempt to kiss up to you KDE guys) that KDE is
the future of Linux on the desktop! Maybe it is not for the Hacker kid from
next door, but for the normal Linux User, like my Mom, your Sister or the old
non-techy guy from next door, KDE is simple enough to understand and powerful
enough to get stuff done efficiently without getting in your way too much.</p>

<p>So here&#39;s my request:</p>

<p>Please, KDE Project, make your configuration files <em>human readable,
editor-friendly and syncable (via tools like git)</em>. That means that there are
<em>no temporary values</em> and <em>no state information</em> in the configuration files.
That means that configuration files do not get shuffled when a user alters a
configuration via a GUI tool. That means that the format of the configuration
files do not get automatically changed.</p>

<p>The benefits are clear, and there are no drawbacks for KDE as a project (as
far as I can see) because parsing and processing the configuration files will
be done either way. Maybe it even reduces the complexity of some things in
your codebase?</p>

<hr>

<p>A word on “why don&#39;t you submit this to the KDE project as a request”: I am
not involved with KDE <em>at all</em>. I don&#39;t even know where the documentation, bug
tracker, mailinglist(s), ... are located. I don&#39;t know where to file these
things, whether I have to register at some forum or whatever.</p>

<p>If someone could point me to a place where nice people will discuss these
things with me, feel free <a href="mailto://mail@beyermatthias.de">to send me an email and guide me to this
place</a>!</p>

<p>tags:  <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:git" class="hashtag"><span>#</span><span class="p-category">git</span></a> <a href="https://beyermatthias.de/tag:desktop" class="hashtag"><span>#</span><span class="p-category">desktop</span></a> <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/please-kde-make-your-config-syncable</guid>
      <pubDate>Sun, 10 Sep 2017 16:38:17 +0200</pubDate>
    </item>
    <item>
      <title>Planning a log-functionality refactoring for imag</title>
      <link>https://beyermatthias.de/planning-a-log-functionality-refactoring-for-imag</link>
      <description>&lt;![CDATA[Here I want to describe how I plan to refactor the logging back end&#xA;implementation for imag.&#xA;&#xA;small&#xA;  This post was published on imag-pim.org as well as&#xA;  on my personal blog.&#xA;/small&#xA;&#xA;What we have&#xA;&#xA;Right now, the logging implementation is ridiculously simple. What we do is:&#xA;On every call to one of the logging macros, the log crate gives us an object&#xA;with a few informations (line number, file, log message,...) - we apply our&#xA;format, some color and write it to stderr.&#xA;&#xA;This is of course rather simple and not really flexible.&#xA;&#xA;What we want to have&#xA;&#xA;I want to rewrite the logging backend to give the user more power about the&#xA;logging. As we only have to rewrite the backend, and the log crate handles&#xA;everything else, the actual logging looks non different and &#34;client&#34; code does&#xA;not change.&#xA;&#xA;+----------------------------+&#xA;| imag code, libs, bins, ... |&#xA;+----------------------------+&#xA;              |&#xA;              | calls&#xA;              |&#xA;              v&#xA;+----------------------------+&#xA;| crate: &#34;log&#34;               |&#xA;+----------------------------+&#xA;              |&#xA;              | calls&#xA;              |&#xA;              v&#xA;+----------------------------+&#xA;| imag logging backend impl. |&#xA;+----------------------------+&#xA;&#xA;So what features do we want?&#xA;First of all, the imag user must be able to configure the logging.&#xA;Not only with the configuration file but also via environment&#xA;variables and of course command line parameters. The former will be overridden&#xA;by the latter, respectively. This gives the user nice control, as she can&#xA;configure imag to log to stderr with only warnings being logged but when calling&#xA;a script of imag commands or calling imag directly from the command line, these&#xA;settings can be temporarily (for the script or one command) be overridden.&#xA;&#xA;The configuration options I have in mind are best described by an example:&#xA;&#xA;The logging section of the configuration&#xA;[logging]&#xA;&#xA;the default logging level&#xA;Valid values are &#34;trace&#34;, &#34;debug&#34;, &#34;info&#34;, &#34;warn&#34;, &#34;error&#34;&#xA;level = &#34;debug&#34;&#xA;&#xA;the destinations of the logging output.&#xA;&#34;-&#34; is for stderr, multiple destinations are possible&#xA;default-destinations = [ &#34;-&#34;, &#34;/tmp/imag.log&#34; ]&#xA;&#xA;The format for the logging output&#xA;&#xA;The format supports variables which are inserted for each logging call:&#xA;&#xA;&#34;%no%&#34;       - The of the logging call&#xA;&#34;%thread%&#34;   - The thread id from the thread calling the log&#xA;&#34;%level%&#34;    - The logging level&#xA;&#34;%module%&#34;   - The module name&#xA;&#34;%file%&#34;     - The file path where the logging call appeared&#xA;&#34;%line%&#34;     - The line No of the logging call&#xA;&#34;%message%&#34;&#34; - The logging message&#xA;&#xA;Functions can be applied to the variables to change the color of&#xA;the substitutions.&#xA;&#xA;A format must contain &#34;%message%, else imag fails because no logging should&#xA;be forbidden&#xA;&#xA;[logging.formats]&#xA;trace = &#34;cyan(imag%thread%%module%[%line%]): %message%&#34;&#xA;debug = &#34;cyan(imag%thread%%module%[%line%]): %message%&#34;&#xA;info  = &#34;[imag]: %message%&#34;&#xA;warn  = &#34;red([imag]:) %message%&#34;&#xA;error = &#34;red(blinking(imag]): %message%)&#34;&#xA;&#xA;Example entry for one imag module&#xA;If a module is not configured or keys are missing&#xA;the default values from above are applied&#xA;[logging.modules.libimagstore]&#xA;enabled = true&#xA;level = &#34;trace&#34;&#xA;destinations = [ &#34;-&#34; ]&#xA;A format is only globally configurable, not per-module&#xA;&#xA;One of the most complex things in here would be the format parsing, as variable&#xA;expansion and functions to apply are some kind of DSL I have to implement.&#xA;I hope I can do this - maybe there&#39;s even a crate for helping me with this?&#xA;Maybe the shellexpand&#xA;library will do?&#xA;&#xA;These things and configuration options give the user great power over the&#xA;logging.&#xA;&#xA;The approach&#xA;&#xA;Because imag already logs a lot, I think about an approach where one thread is&#xA;used for the actual logging. Because each logging call involves a lot of&#xA;complexity, I want to move that to a dedicated thread where other threads speak&#xA;to the logging thread via a MPSC queue.&#xA;&#xA;Of course, this should be opt-in.&#xA;&#xA;The idea is that the logging starts a thread upon construction (which is really&#xA;early in the imag process, nearly one of the first operations done). This&#xA;happens when the Runtime object is build and hence no &#34;client code&#34; has to be&#xA;changed, all changes remain in libimagrt.&#xA;&#xA;This thread is bound to the Runtime object, logging calls (via the logging&#xA;backend which is implemented for the log crate) talk to it via a channel. The&#xA;thread then does the heavy lifting. Of course, configuration can be aggregated&#xA;on construction of the logging thread.&#xA;&#xA;The logging thread is killed when the Runtime object is dropped (one of the&#xA;last operations in each imag process). Of course, the queue has to be emptied&#xA;before the logging is closed.&#xA;&#xA;I am also thinking about converting the code base to use the slog crate, which&#xA;offers structured logging. But I&#39;m not yet sure whether we will benefit from&#xA;that, because I don&#39;t know whether we would need to pass a state-object around.&#xA;If that is the case, I cannot do this as this would introduce a lot of&#xA;complexity which I don&#39;t want to have. If no such object needs to be passed&#xA;around, I still have to evaluate whether the slog crate is a nice idea and of&#xA;course this would also increase the number of (complex) dependencies by one...&#xA;and I&#39;m not sure whether the benefits outrule the inconveniences.&#xA;&#xA;tags:  #linux #open source #programming #rust #software #tools #imag&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Here I want to describe how I plan to refactor the logging back end
implementation for imag.</p>

<p><small>
  This post was published on <a href="https://imag-pim.org">imag-pim.org</a> as well as
  on <a href="https://beyermatthias.de">my personal blog</a>.
</small></p>

<h1 id="what-we-have" id="what-we-have">What we have</h1>

<p>Right now, the logging implementation is ridiculously <em>simple</em>. What we do is:
On every call to one of the logging macros, the <code>log</code> crate gives us an object
with a few informations (line number, file, log message,...) – we apply our
format, some color and write it to <code>stderr</code>.</p>

<p>This is of course rather simple and not really flexible.</p>

<h1 id="what-we-want-to-have" id="what-we-want-to-have">What we want to have</h1>

<p>I want to rewrite the logging backend to give the user more power about the
logging. As we only have to rewrite the <em>backend</em>, and the <code>log</code> crate handles
everything else, the actual logging looks non different and “client” code does
not change.</p>

<pre><code>+----------------------------+
| imag code, libs, bins, ... |
+----------------------------+
              |
              | calls
              |
              v
+----------------------------+
| crate: &#34;log&#34;               |
+----------------------------+
              |
              | calls
              |
              v
+----------------------------+
| imag logging backend impl. |
+----------------------------+
</code></pre>

<p>So what features do we want?
First of all, the imag user must be able to configure the logging.
Not only with the configuration file but also via environment
variables and of course command line parameters. The former will be overridden
by the latter, respectively. This gives the user nice control, as she can
configure imag to log to stderr with only warnings being logged but when calling
a script of imag commands or calling imag directly from the command line, these
settings can be temporarily (for the script or one command) be overridden.</p>

<p>The configuration options I have in mind are best described by an example:</p>

<pre><code class="language-toml"># The logging section of the configuration
[logging]

# the default logging level
# Valid values are &#34;trace&#34;, &#34;debug&#34;, &#34;info&#34;, &#34;warn&#34;, &#34;error&#34;
level = &#34;debug&#34;

# the destinations of the logging output.
# &#34;-&#34; is for stderr, multiple destinations are possible
default-destinations = [ &#34;-&#34;, &#34;/tmp/imag.log&#34; ]

# The format for the logging output
#
# The format supports variables which are inserted for each logging call:
#
#  &#34;%no%&#34;       - The of the logging call
#  &#34;%thread%&#34;   - The thread id from the thread calling the log
#  &#34;%level%&#34;    - The logging level
#  &#34;%module%&#34;   - The module name
#  &#34;%file%&#34;     - The file path where the logging call appeared
#  &#34;%line%&#34;     - The line No of the logging call
#  &#34;%message%&#34;&#34; - The logging message
#
# Functions can be applied to the variables to change the color of
# the substitutions.
#
# A format _must_ contain &#34;%message%, else imag fails because no logging should
# be forbidden
#
[logging.formats]
trace = &#34;cyan([imag][%no%][%thread%][%level%][%module%][%file%][%line%]): %message%&#34;
debug = &#34;cyan([imag][%no%][%thread%][%level%][%module%][%file%][%line%]): %message%&#34;
info  = &#34;[imag]: %message%&#34;
warn  = &#34;red([imag]:) %message%&#34;
error = &#34;red(blinking([imag][uppercase(%level%)]): %message%)&#34;

# Example entry for one imag module
# If a module is not configured or keys are missing
# the default values from above are applied
[logging.modules.libimagstore]
enabled = true
level = &#34;trace&#34;
destinations = [ &#34;-&#34; ]
# A format is only globally configurable, not per-module
</code></pre>

<p>One of the most complex things in here would be the format parsing, as variable
expansion and functions to apply are some kind of DSL I have to implement.
I hope I can do this – maybe there&#39;s even a crate for helping me with this?
Maybe the <a href="https://netvl.github.io/shellexpand/shellexpand/fn.env_with_context.html">shellexpand</a>
library will do?</p>

<p>These things and configuration options give the user great power over the
logging.</p>

<h1 id="the-approach" id="the-approach">The approach</h1>

<p>Because imag already logs <em>a lot</em>, I think about an approach where one thread is
used for the actual logging. Because each logging call involves a lot of
complexity, I want to move that to a dedicated thread where other threads speak
to the logging thread via a MPSC queue.</p>

<p>Of course, this should be opt-in.</p>

<p>The idea is that the logging starts a thread upon construction (which is really
early in the imag process, nearly one of the first operations done). This
happens when the <code>Runtime</code> object is build and hence no “client code” has to be
changed, all changes remain in libimagrt.</p>

<p>This thread is bound to the <code>Runtime</code> object, logging calls (via the logging
backend which is implemented for the <code>log</code> crate) talk to it via a channel. The
thread then does the heavy lifting. Of course, configuration can be aggregated
on construction of the logging thread.</p>

<p>The logging thread is killed when the <code>Runtime</code> object is dropped (one of the
last operations in each imag process). Of course, the queue has to be emptied
before the logging is closed.</p>

<p>I am also thinking about converting the code base to use the <code>slog</code> crate, which
offers structured logging. But I&#39;m not yet sure whether we will benefit from
that, because I don&#39;t know whether we would need to pass a state-object around.
If that is the case, I cannot do this as this would introduce a lot of
complexity which I don&#39;t want to have. If no such object needs to be passed
around, I still have to evaluate whether the <code>slog</code> crate is a nice idea and of
course this would also increase the number of (complex) dependencies by one...
and I&#39;m not sure whether the benefits outrule the inconveniences.</p>

<p>tags:  <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a> source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:imag" class="hashtag"><span>#</span><span class="p-category">imag</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/planning-a-log-functionality-refactoring-for-imag</guid>
      <pubDate>Sun, 27 Aug 2017 16:38:17 +0200</pubDate>
    </item>
    <item>
      <title>imag-pim.org - The new website</title>
      <link>https://beyermatthias.de/imag-pim-org-the-new-website</link>
      <description>&lt;![CDATA[The imag-pim.org website just got a new face.&#xA;&#xA;I was really eager to do this becaues the old style was... not that optimal&#xA;(I&#39;m not a web dev, let alone a web designer).&#xA;&#xA;Because the site is now generated using hugo, I also&#xA;copied the &#34;What&#39;s coming up in imag&#34; blog posts over there (I keeping the old&#xA;ones in this blog for not breaking any links).&#xA;New articles will be published on the imag-pim.org&#xA;website.&#xA;&#xA;This very blog article will be published on both sites, of course.&#xA;&#xA;tags:  #linux #open source #rust #software #tools #imag&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>The <a href="https://imag-pim.org">imag-pim.org</a> website just got a new face.</p>

<p>I was really eager to do this becaues the old style was... not that optimal
(I&#39;m not a web dev, let alone a web designer).</p>

<p>Because the site is now generated using <a href="https://gohogo.io">hugo</a>, I also
copied the “What&#39;s coming up in imag” blog posts over there (I keeping the old
ones in this blog for not breaking any links).
New articles will be published on the <a href="https://imag-pim.org">imag-pim.org</a>
website.</p>

<p>This very blog article will be published on both sites, of course.</p>

<p>tags:  <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a> source <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:imag" class="hashtag"><span>#</span><span class="p-category">imag</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/imag-pim-org-the-new-website</guid>
      <pubDate>Sat, 10 Jun 2017 16:38:13 +0200</pubDate>
    </item>
    <item>
      <title>What&#39;s coming up in imag (25)</title>
      <link>https://beyermatthias.de/whats-coming-up-in-imag-25</link>
      <description>&lt;![CDATA[This is the&#xA;25th&#xA;iteration on what happened in the last four weeks in the&#xA;imag project, the text based personal information management suite for the commandline.&#xA;&#xA;!-- more --&#xA;&#xA;small&#xA;&#x9;imag is a personal information management suite for the commandline.&#xA;&#x9;Its target audience are commandline- and power-users.&#xA;&#x9;It does not reimplement personal information management (PIM) aspects, but&#xA;    re-uses existing tools and standards to be an iaddition/i to an existing&#xA;&#x9;workflow, so one does not have to learn a new tool before beeing productive&#xA;&#x9;again.&#xA;    Some simple PIM aspects are implemented as imag modules, though.&#xA;&#x9;It gives the user the power to iconnect/i data from different existing&#xA;&#x9;tools and iadd meta-information/i to these connections, so one can do&#xA;&#x9;data-mining on PIM data.&#xA;/small&#xA;&#xA;What happenend?&#xA;&#xA;Luckily I can write this iteration on imag.&#xA;After we had no blog post about&#xA;the progress in imag in April this year, due to no time on my side, I&#39;m not&#xA;very lucky to be able to report: We had progress in the last 4 (8) weeks!&#xA;&#xA;Lets have a look at the merged PRs (I&#39;m now starting to link to git.imag-pim.org here):&#xA;&#xA;915&#xA;  merged a libruby dependency for travis.&#xA;918&#xA;  removed some compiler warnings.&#xA;917&#xA;  merged some travis enhancements/fixes.&#xA;916&#xA;  superceeded PR #898, which simplified the implementation of the FoldResult&#xA;  extension.&#xA;895&#xA;  started a re-do of the ruby build setup.&#xA;911&#xA;  changed the interface of the StoreId::exists() function to return a&#xA;  Result now.&#xA;904&#xA;  added initial support for annotations in the libimagentrylink library,&#xA;  which gives us the posibility to add annotations to links. There are no&#xA;  tests yet and also no remove functionality.&#xA;921&#xA;  was a cleanup PR for &#xA;  #911&#xA;  which broke master unexpectedly.&#xA;914&#xA;  fixed a compiler warning.&#xA;929&#xA;  removed libimagruby entirely because we couldn&#39;t merge to master because a&#xA;  dependency on master started to fail.&#xA;  The whole ruby thing is a complete mess right now, dependencies are not&#xA;  found, tests fail because of this... it is a mess.&#xA;927&#xA;  removed unused imports.&#xA;924&#xA;  updated links in the readme file.&#xA;926&#xA;  added tests for the StoreId type.&#xA;919&#xA;  merged preparings for the 0.3.0 release, which is overdue for one month&#xA;  right now, because the ruby scripting interface does not work.&#xA;930&#xA;  updated the toml-rs dependency to 0.4, which gives us even more&#xA;  superpowers.&#xA;932&#xA;  added some tests for the configuration parsing functionality.&#xA;933&#xA;  Adds a new dependency: is-match, a library I extracted from the imag&#xA;  source code into a new crate.&#xA;&#xA;The libimagruby mess&#xA;&#xA;Well, this is unfortunate.&#xA;&#xA;libimagruby should be ready for one month by now and usable - and it is (the&#xA;basic things, few things tested also)!&#xA;But as the CI does not work (fuck you travis!) I cannot merge it.&#xA;I also don&#39;t know how to properly package a Ruby gem, so there&#39;s that.&#xA;&#xA;I really hope @malept&#xA;can help me.&#xA;&#xA;I&#39;m already thinking about adding another scripting interface, so I can&#xA;continue and start implementing frontends for imag, for example I&#39;m thinking&#xA;about a lua or ketos interface, still.&#xA;Lua might be the better idea, as there are libraries around for certain&#xA;things, while there are no libraries for ketos (I assume).&#xA;&#xA;What will happen&#xA;&#xA;I honestly don&#39;t know. I will continue working on imag, of course, but right&#xA;now, the libimagruby is stalled.&#xA;I&#39;m not sure where to start working besides libimagruby - a Ruby scripting&#xA;interface is what I need right now, but it won&#39;t work ... so there&#39;s that.&#xA;&#xA;As soon as the Ruby interface is ready, we can have nice things. But right&#xA;now, it is really hard to continue.&#xA;&#xA;tags:  #linux #open source #programming #rust #software #tools #imag&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>This is the
25th
iteration on what happened in the last four weeks in the
<a href="http://imag-pim.org">imag project, the text based personal information management suite for the commandline</a>.</p>



<p><small>
    imag is a personal information management suite for the commandline.
    Its target audience are commandline- and power-users.
    It does not reimplement personal information management (PIM) aspects, but
    re-uses existing tools and standards to be an <i>addition</i> to an existing
    workflow, so one does not have to learn a new tool before beeing productive
    again.
    Some simple PIM aspects are implemented as imag modules, though.
    It gives the user the power to <i>connect</i> data from different existing
    tools and <i>add meta-information</i> to these connections, so one can do
    data-mining on PIM data.
</small></p>

<h1 id="what-happenend" id="what-happenend">What happenend?</h1>

<p>Luckily I can write this iteration on imag.
After we had no blog post about
the progress in imag in April this year, due to no time on my side, I&#39;m not
very lucky to be able to report: We had progress in the last 4 (8) weeks!</p>

<p>Lets have a look at the merged PRs (I&#39;m now starting to link to git.imag-pim.org here):</p>
<ul><li><a href="http://git.imag-pim.org/imag/commit/?id=e615ec040f57b9b4b20f58d623fe32b0e6588257">#915</a>
merged a libruby dependency for travis.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=63faf06bc2774ac309c3783a8eefb286de30e570">#918</a>
removed some compiler warnings.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=6f6368ed2f120fafce94ec07e3abd5061242eb64">#917</a>
merged some travis enhancements/fixes.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=9396accc28a63d280b61e2206320a6b1afeafdc3">#916</a>
superceeded PR #898, which simplified the implementation of the <code>FoldResult</code>
extension.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=6fa281a1a4e0c99b4bcb5a95f016018ef7453cd3">#895</a>
started a re-do of the ruby build setup.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=5b93f3848cb60ae76a450f79b6f3bd984847db0e">#911</a>
changed the interface of the <code>StoreId::exists()</code> function to return a
<code>Result</code> now.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=03f17b8a1c71efc385b645c0db74a5e2f6b9dfd9">#904</a>
added initial support for annotations in the <code>libimagentrylink</code> library,
which gives us the posibility to add annotations to links. There are no
tests yet and also no remove functionality.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=25a35183dd29051a159475f4a18d10de5051387c">#921</a>
was a cleanup PR for
<a href="http://git.imag-pim.org/imag/commit/?id=5b93f3848cb60ae76a450f79b6f3bd984847db0e">#911</a>
which broke master unexpectedly.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=7e3c9467e7b95324f1bc34dc05fb8b33e2a26e90">#914</a>
fixed a compiler warning.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=8eaead5f52894fb5c46fe9e5fbefbbf1d80fd6de">#929</a>
removed <code>libimagruby</code> entirely because we couldn&#39;t merge to master because a
dependency on master started to fail.
The whole ruby thing is a complete mess right now, dependencies are not
found, tests fail because of this... it is a mess.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=241f9752534c2518b160141509914ed7bb1d364e">#927</a>
removed unused imports.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=c74c26ccd143d905c94ecf84ac423293b7170623">#924</a>
updated links in the readme file.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=878162f263b8d90dccbea8b1b82e96e005e04860">#926</a>
added tests for the <code>StoreId</code> type.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=1da56c6d9df689150c94631bbb5147c36070b75c">#919</a>
merged preparings for the 0.3.0 release, which is overdue for one month
right now, because the ruby scripting interface does not work.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=4257ec10268fef06d5888c48f9fc8f9e6f35c5ba">#930</a>
updated the <code>toml-rs</code> dependency to <code>0.4</code>, which gives us even more
superpowers.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=a5857fa64c949c9f2c9dea3036d870bd592272cc">#932</a>
added some tests for the configuration parsing functionality.</li>
<li><a href="http://git.imag-pim.org/imag/commit/?id=4ba19430b754d47fc673164f7db7c1e4e619eb31">#933</a>
Adds a new dependency: <code>is-match</code>, a library I extracted from the imag
source code into a new crate.</li></ul>

<h1 id="the-libimagruby-mess" id="the-libimagruby-mess">The libimagruby mess</h1>

<p>Well, this is unfortunate.</p>

<p><code>libimagruby</code> should be ready for one month by now and usable – and it is (the
basic things, few things tested also)!
But as the CI does not work (fuck you travis!) I cannot merge it.
I also don&#39;t know how to properly package a Ruby gem, so there&#39;s that.</p>

<p>I really hope <strong><a href="https://github.com/matthiasbeyer/imag/pull/925">@malept</a></strong>
can help me.</p>

<p>I&#39;m already thinking about adding another scripting interface, so I can
continue and start implementing frontends for imag, for example I&#39;m thinking
about a lua or ketos interface, still.
Lua might be the better idea, as there are libraries around for certain
things, while there are no libraries for ketos (I assume).</p>

<h1 id="what-will-happen" id="what-will-happen">What will happen</h1>

<p>I honestly don&#39;t know. I will continue working on imag, of course, but right
now, the <code>libimagruby</code> is stalled.
I&#39;m not sure where to start working besides <code>libimagruby</code> – a Ruby scripting
interface is what I need right now, but it won&#39;t work ... so there&#39;s that.</p>

<p>As soon as the Ruby interface is ready, we can have nice things. But right
now, it is really hard to continue.</p>

<p>tags:  <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a> source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:imag" class="hashtag"><span>#</span><span class="p-category">imag</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/whats-coming-up-in-imag-25</guid>
      <pubDate>Sat, 13 May 2017 16:38:13 +0200</pubDate>
    </item>
    <item>
      <title>Redefining my vim workflow</title>
      <link>https://beyermatthias.de/redefining-my-vim-workflow</link>
      <description>&lt;![CDATA[I use vim for my everyday things. No, actually I use vim for everything.&#xA;&#xA;And today I rewrote large parts of my vim configuration. Here&#39;s why.&#xA;&#xA;!-- more --&#xA;&#xA;Dead mappings&#xA;&#xA;I removed a lot of mappings from my vimrc that I did not used.&#xA;For example: I had a mapping in normal mode that&#39;d fire up fzf for the&#xA;complete filetree I was in.&#xA;I didn&#39;t use it in months, maybe more, because I use netrw (the vim-builtin&#xA;file manager).&#xA;&#xA;I don&#39;t need plugins&#xA;&#xA;Well, at least you don&#39;t need the most of them.&#xA;First, I removed maybe three or four plugins I didn&#39;t use at all, for example&#xA;the &#34;linux-kernel-style&#34; plugin or &#34;Goyo&#34; and &#34;Limelight&#34;.&#xA;Not because I didn&#39;t like them (I do, believe me), but because I simply did&#xA;not use them at all.&#xA;I also removed everything with snippets, because I barely used them.&#xA;So &#34;UltiSnips&#34; and all the snippet packages are gone now.&#xA;&#xA;Then, for example, I had the vim plugin &#34;vim-indent-guides&#34; with a great&#xA;snippet of viml I found online:&#xA;&#xA;&#34; Simple replacement for vim-indent-guides&#xA;&#34;&#xA;&#34; unicode characters explained:&#xA;&#34; tab: \uBB == &#34;    &#34;&#xA;&#34; trail: \uB8 == &#34;-&#34; in red box&#xA;exec &#34;set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~&#34;&#xA;set list&#xA;&#xA;This does the very same as indent-guides and even does more, because I can&#xA;have a dot (unicode character \uB7) if there is trailing whitespace at the end&#xA;of a line.&#xA;I really like that!&#xA;&#xA;vim as server&#xA;&#xA;Because I&#39;m running&#xA;XFCE, as explained in another post&#xA;for some time now (and I still like it), I figured that I could use gvim&#xA;instead of commandline vim.&#xA;But gvim startup time is not that great - so I figured that I could use the&#xA;awesome vim server capability to have only one running vim instance.&#xA;&#xA;So I re-configured my aliases to be&#xA;&#xA;alias vim=&#34;vim -g --servername VIM --remote-tab-silent&#34;;&#xA;&#xA;for example, so I automatically start in a running gvim instance (which has&#xA;the name VIM by default).&#xA;If no vim instance is running, this automatically starts a new gvim&#xA;instance.&#xA;&#xA;But because I&#39;m a notorious :q-hitting vimmer, I remapped :q:&#xA;&#xA;if has(&#34;guirunning&#34;)&#xA;  cnoremap silent wqCR wbarbdCR&#xA;  cnoremap silent qCR  bdCR&#xA;  cnoremap silent xCR  bdCR&#xA;  nmap Leaderq :bdCR&#xA;endif&#xA;&#xA;So when I hit :q it actually executes bd, which just closes the current&#xA;buffer.&#xA;If the current buffer is the last buffer, it enters an anonymous buffer&#xA;instead.&#xA;This is really awesome!&#xA;To actually close my vim session, I have to :quit now, which is longer and&#xA;therefor I have more time to stop myself from doing that.&#xA;&#xA;---&#xA;&#xA;Edit 2017-03-06:&#xA;&#xA;The code above did not completely work as intended, so I changed it to the&#xA;following:&#xA;&#xA;if has(&#34;guirunning&#34;)&#xA;  fu! CloseWindowOrBuffer()&#xA;    if winnr(&#39;$&#39;) == 1&#xA;      if bufnr(&#39;$&#39;) == 1&#xA;        :echo &#34;Closing last instance not allowed&#34;&#xA;      else&#xA;        :bd&#xA;      endif&#xA;    else&#xA;      :close&#xA;    endif&#xA;&#xA;  endf&#xA;  nmap Leaderq :call CloseWindowOrBuffer()&#xA;&#xA;  cnoremap silent wqCR wCR:call CloseWindowOrBuffer()CR&#xA;  cnoremap silent qCR  :call CloseWindowOrBuffer()CR&#xA;  cnoremap silent xCR  bdCR&#xA;else&#xA;  nmap Leaderq :q&#xA;endif&#xA;&#xA;I&#39;m still not sure whether this is what I want.&#xA;&#xA;---&#xA;&#xA;env!&#xA;&#xA;Finally, I set my $EDITOR and $GITEDITOR variables to &#xA;&#xA;export EDITOR=&#34;vim -g --servername VIM --remote-tab-wait-silent&#34;&#xA;export GITEDITOR=&#34;vim -g --servername VIM --remote-tab-wait-silent&#34;&#xA;&#xA;To get the best experience when calling vim through scripts or other programs&#xA;like git.&#xA;&#xA;What I want to get from this&#xA;&#xA;Well, I made my vim installation a lot less bloated.&#xA;By removing a bunch of plugins I made vim start up way faster, and by using&#xA;only one vim instance for all the things, even more.&#xA;Using gvim, I can have pretty fonts and so on.&#xA;&#xA;I wonder how these things work out for me...&#xA;&#xA;tags:  #desktop #linux #vim&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I use vim for my everyday things. No, actually I use vim for everything.</p>

<p>And today I rewrote large parts of my vim configuration. Here&#39;s why.</p>



<h1 id="dead-mappings" id="dead-mappings">Dead mappings</h1>

<p>I removed a lot of mappings from my vimrc that I did not used.
For example: I had a mapping in normal mode that&#39;d fire up <code>fzf</code> for the
complete filetree I was in.
I didn&#39;t use it in months, maybe more, because I use <code>netrw</code> (the vim-builtin
file manager).</p>

<h1 id="i-don-t-need-plugins" id="i-don-t-need-plugins">I don&#39;t need plugins</h1>

<p>Well, at least you don&#39;t need the most of them.
First, I removed maybe three or four plugins I didn&#39;t use at all, for example
the “linux-kernel-style” plugin or “Goyo” and “Limelight”.
Not because I didn&#39;t like them (I do, believe me), but because I simply did
not use them at all.
I also removed everything with snippets, because I barely used them.
So “UltiSnips” and all the snippet packages are gone now.</p>

<p>Then, for example, I had the vim plugin “vim-indent-guides” with a great
snippet of viml I found online:</p>

<pre><code>&#34; Simple replacement for vim-indent-guides
&#34;
&#34; unicode characters explained:
&#34; tab: \uBB == &#34;&gt;&gt;&#34;
&#34; trail: \uB8 == &#34;-&#34; in red box
exec &#34;set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~&#34;
set list
</code></pre>

<p>This does the very same as indent-guides and even does more, because I can
have a dot (unicode character \uB7) if there is trailing whitespace at the end
of a line.
I really like that!</p>

<h1 id="vim-as-server" id="vim-as-server">vim as server</h1>

<p>Because I&#39;m running
<a href="/blog/2017/02/02/my-switch-to-xfce/">XFCE, as explained in another post</a>
for some time now (and I still like it), I figured that I could use <code>gvim</code>
instead of commandline vim.
But <code>gvim</code> startup time is not that great – so I figured that I could use the
awesome vim server capability to have only one running vim instance.</p>

<p>So I re-configured my aliases to be</p>

<pre><code>alias vim=&#34;vim -g --servername VIM --remote-tab-silent&#34;;
</code></pre>

<p>for example, so I automatically start in a running gvim instance (which has
the name <code>VIM</code> by default).
If no vim instance is running, this automatically starts a new <code>gvim</code>
instance.</p>

<p>But because I&#39;m a notorious <code>:q</code>-hitting vimmer, I remapped <code>:q</code>:</p>

<pre><code>if has(&#34;gui_running&#34;)
  cnoremap &lt;silent&gt; wq&lt;CR&gt; w&lt;bar&gt;bd&lt;CR&gt;
  cnoremap &lt;silent&gt; q&lt;CR&gt;  bd&lt;CR&gt;
  cnoremap &lt;silent&gt; x&lt;CR&gt;  bd&lt;CR&gt;
  nmap &lt;Leader&gt;q :bd&lt;CR&gt;
endif
</code></pre>

<p>So when I hit <code>:q</code> it actually executes <code>bd</code>, which just closes the current
buffer.
If the current buffer is the last buffer, it enters an anonymous buffer
instead.
This is really awesome!
To actually close my vim session, I have to <code>:quit</code> now, which is longer and
therefor I have more time to stop myself from doing that.</p>

<hr>

<p><em>Edit 2017-03-06:</em></p>

<p>The code above did not completely work as intended, so I changed it to the
following:</p>

<pre><code>if has(&#34;gui_running&#34;)
  fu! CloseWindowOrBuffer()
    if winnr(&#39;$&#39;) == 1
      if bufnr(&#39;$&#39;) == 1
        :echo &#34;Closing last instance not allowed&#34;
      else
        :bd
      endif
    else
      :close
    endif

  endf
  nmap &lt;Leader&gt;q :call CloseWindowOrBuffer()

  cnoremap &lt;silent&gt; wq&lt;CR&gt; w&lt;CR&gt;:call CloseWindowOrBuffer()&lt;CR&gt;
  cnoremap &lt;silent&gt; q&lt;CR&gt;  :call CloseWindowOrBuffer()&lt;CR&gt;
  cnoremap &lt;silent&gt; x&lt;CR&gt;  bd&lt;CR&gt;
else
  nmap &lt;Leader&gt;q :q
endif
</code></pre>

<p>I&#39;m still not sure whether this is what I want.</p>

<hr>

<h1 id="env" id="env">env!</h1>

<p>Finally, I set my <code>$EDITOR</code> and <code>$GIT_EDITOR</code> variables to</p>

<pre><code>export EDITOR=&#34;vim -g --servername VIM --remote-tab-wait-silent&#34;
export GIT_EDITOR=&#34;vim -g --servername VIM --remote-tab-wait-silent&#34;
</code></pre>

<p>To get the best experience when calling vim through scripts or other programs
like <code>git</code>.</p>

<h1 id="what-i-want-to-get-from-this" id="what-i-want-to-get-from-this">What I want to get from this</h1>

<p>Well, I made my vim installation a lot less bloated.
By removing a bunch of plugins I made vim start up way faster, and by using
only one vim instance for all the things, even more.
Using <code>gvim</code>, I can have pretty fonts and so on.</p>

<p>I wonder how these things work out for me...</p>

<p>tags:  <a href="https://beyermatthias.de/tag:desktop" class="hashtag"><span>#</span><span class="p-category">desktop</span></a> <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://beyermatthias.de/tag:vim" class="hashtag"><span>#</span><span class="p-category">vim</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/redefining-my-vim-workflow</guid>
      <pubDate>Sun, 05 Mar 2017 16:41:04 +0100</pubDate>
    </item>
    <item>
      <title>How to install NixOS from NixOS</title>
      <link>https://beyermatthias.de/how-to-install-nixos-from-nixos</link>
      <description>&lt;![CDATA[When the last semester came to an end, I noticed that my Thinkpad behaved weird.&#xA;I couldn&#39;t nix-store --optimize it, and some other things began to fail&#xA;silently.&#xA;I suspected the SSD was dying, a Crucial C400 with 256GB.&#xA;So I ran the smart tools with a short test - But it told me everything was&#xA;alright.&#xA;Then I ran the extended self-test on the drive and after 40% of the check (60%&#xA;remaining) it told me about dead sectors, nonrecoverable.&#xA;&#xA;So I got a new SSD and installed NixOS from my old installation. Here&#39;s how.&#xA;&#xA;!-- more --&#xA;&#xA;So I got a nice new Samsung EVO 850 PRO with 256 GB.&#xA;I was really amazed how light these things are today.&#xA;No heavy metal in there like in a HDD!&#xA;&#xA;Preparation&#xA;&#xA;First of, you need to prepare your current installation.&#xA;Make some backups, be sure everything is fine with them.&#xA;&#xA;Then, verify that your configuration.nix and your hardware-configuration.nix&#xA;file list your partitions not by UUID, but by /dev/sda1 and so on.&#xA;That could be really helpful later.&#xA;&#xA;If you have some crypto keys you need to keep, maybe make another backup of&#xA;them.&#xA;&#xA;The installation&#xA;&#xA;First of, we need to format the new drive.&#xA;Use gdisk for this if you have a UEFI setup like with an Thinkpad X220.&#xA;Format your partitions after that.&#xA;Make sure that your boot partition is formatted as vfat (fat16).&#xA;I don&#39;t know why, but it is only possible to boot from vfat,&#xA;according to the nixos documentation.&#xA;Also, do your cryptsetup.&#xA;&#xA;For simplicity, I refer to the boot partition by /dev/sda1 and to the&#xA;root/home partition as /dev/sda2 - you can, of course, have more partitions,&#xA;maybe for a seperate /home.&#xA;But I saw no need for it.&#xA;With only one partition I do not have to take care of the size of the&#xA;/nix/store and if I have few things in the store I can grow my music&#xA;collection a bit - so I&#39;m really flexible.&#xA;And yes, I know about LVM, but I really don&#39;t need these things, do I?&#xA;&#xA;Now, mount the partitions as follows:&#xA;&#xA;/dev/sda2 in /mnt&#xA;/dev/sda1 in /mnt/boot (you might need to mkdir this directory first)&#xA;&#xA;Ensure things are properly mounted.&#xA;This broke my neck twice during my installation, as /mnt/boot wasn&#39;t mounted&#xA;properly and I failed to rebuild the system.&#xA;Took me some time to see this, actually.&#xA;&#xA;Now you can nixos-generate-config --root /mnt.&#xA;After that you might want to modify your configuration.nix file in the newly&#xA;generated setup under /mnt/etc/nixos/configuration.nix - I did not!&#xA;I nixos-install --root /mnted to get a minimal bootable system.&#xA;&#xA;Then I rsync -aed my /home/$USER to /mnt/home/ and symlinked the&#xA;configuration.nix (which lives in /home/$USER/config/nixos/$HOSTNAME.nix on&#xA;my machines) to /etc/nixos/configuration.nix.&#xA;I renamed the host as well, to avoid confusion.&#xA;&#xA;Then, I shutdowned, removed the old SSD, assembled the new one and booted.&#xA;I had some problems with failing mounts during boot (because I had mount&#xA;operations specified by UUID rather than via /dev/sdaX).&#xA;I got a rescue shell and was able to fix things up.&#xA;After several reboots I was able to get my system up and running.&#xA;&#xA;When I was able to boot my minimal installation, I just followed &#xA;the manual&#xA;and created my user and so on.&#xA;Then, I nixos-rebuild switched.&#xA;And because I copied my whole configuration.nix setup from my old drive,&#xA;everything got build for me.&#xA;&#xA;After some more nix-env -iA calls (because some things only live in my user&#xA;environment), I fully restored my system.&#xA;Awesome!&#xA;&#xA;Conclusion&#xA;&#xA;Installing NixOS from NixOS works really nice.&#xA;You have to be careful with some things, UUIDs and so on, but overall it is&#xA;rather simple.&#xA;&#xA;Anyways, you benefit if you really know your system.&#xA;I wouldn&#39;t necessarily recommend this to an inexperienced NixOS user - hacking&#xA;things into the TTYs and getting a rescue shell for fixing the installation is&#xA;no thing that a newbie really wants to do - except for learing and if backups&#xA;are at hand!&#xA;&#xA;Because of the awesomeness of NixOS and the configuration.nix file, I was able&#xA;to rebuild my complete system within a few minutes.&#xA;Despite my extensive adaptions in my configuration.nix file - speaking of&#xA;container setup, custom compile flags for packages, custom vim setup with&#xA;plugins compiled into the vim derivation (and the same again for neovim),&#xA;hundreds of packages and stuff - I was able to rebuild my system without much&#xA;effort.&#xA;&#xA;Overall, leaving out the UUID fail, I think I am able to redo a complete setup&#xA;(including syncing /home, which was ~100GB data, and reinstalling everything)&#xA;in maybe 90 minutes, depending on how fast the internet connection is for&#xA;downloading binaries.&#xA;&#xA;One could even mount the old /nix/store from the old installation and copy&#xA;over derivations, which would be a hell lot faster and would result in a&#xA;reinstallation without the need for internet access.&#xA;But I don&#39;t know how to do it, so I leave it as exercise to the reader.&#xA;&#xA;tags:  #desktop #linux #nix #nixos&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>When the last semester came to an end, I noticed that my Thinkpad behaved weird.
I couldn&#39;t <code>nix-store --optimize</code> it, and some other things began to fail
silently.
I suspected the SSD was dying, a Crucial C400 with 256GB.
So I ran the <code>smart</code> tools with a short test – But it told me everything was
alright.
Then I ran the extended self-test on the drive and after 40% of the check (60%
remaining) it told me about dead sectors, nonrecoverable.</p>

<p>So I got a new SSD and installed NixOS from my old installation. Here&#39;s how.</p>



<p>So I got a nice new Samsung EVO 850 PRO with 256 GB.
I was really amazed how light these things are today.
No heavy metal in there like in a HDD!</p>

<h1 id="preparation" id="preparation">Preparation</h1>

<p>First of, you need to prepare your current installation.
Make some backups, be sure everything is fine with them.</p>

<p>Then, verify that your <code>configuration.nix</code> and your <code>hardware-configuration.nix</code>
file list your partitions <em>not</em> by UUID, but by <code>/dev/sda1</code> and so on.
That could be really helpful later.</p>

<p>If you have some crypto keys you need to keep, maybe make another backup of
them.</p>

<h1 id="the-installation" id="the-installation">The installation</h1>

<p>First of, we need to format the new drive.
Use <code>gdisk</code> for this if you have a UEFI setup like with an Thinkpad X220.
Format your partitions after that.
Make sure that your boot partition is formatted as <code>vfat</code> (<code>fat16</code>).
I don&#39;t know why, but it is only possible to boot from <code>vfat</code>,
<a href="http://nixos.org/nixos/manual/index.html#sec-uefi-installation">according to the nixos documentation</a>.
Also, do your <code>cryptsetup</code>.</p>

<p>For simplicity, I refer to the boot partition by <code>/dev/sda1</code> and to the
root/home partition as <code>/dev/sda2</code> – you can, of course, have more partitions,
maybe for a seperate <code>/home</code>.
But I saw no need for it.
With only one partition I do not have to take care of the size of the
<code>/nix/store</code> and if I have few things in the store I can grow my music
collection a bit – so I&#39;m really flexible.
And yes, I know about LVM, but I really don&#39;t need these things, do I?</p>

<p>Now, mount the partitions as follows:</p>
<ul><li><code>/dev/sda2</code> in <code>/mnt</code></li>
<li><code>/dev/sda1</code> in <code>/mnt/boot</code> (you might need to <code>mkdir</code> this directory first)</li></ul>

<p><em>Ensure things are properly mounted</em>.
This broke my neck twice during my installation, as <code>/mnt/boot</code> wasn&#39;t mounted
properly and I failed to rebuild the system.
Took me some time to see this, actually.</p>

<p>Now you can <code>nixos-generate-config --root /mnt</code>.
After that you might want to modify your <code>configuration.nix</code> file in the newly
generated setup under <code>/mnt/etc/nixos/configuration.nix</code> – I did not!
I <code>nixos-install --root /mnt</code>ed to get a minimal bootable system.</p>

<p>Then I <code>rsync -a</code>ed my <code>/home/$USER</code> to <code>/mnt/home/</code> and symlinked the
<code>configuration.nix</code> (which lives in <code>/home/$USER/config/nixos/$HOSTNAME.nix</code> on
my machines) to <code>/etc/nixos/configuration.nix</code>.
I renamed the host as well, to avoid confusion.</p>

<p>Then, I <code>shutdown</code>ed, removed the old SSD, assembled the new one and booted.
I had some problems with failing mounts during boot (because I had mount
operations specified by UUID rather than via <code>/dev/sdaX</code>).
I got a rescue shell and was able to fix things up.
After several reboots I was able to get my system up and running.</p>

<p>When I was able to boot my minimal installation, I just followed
<a href="http://nixos.org/nixos/manual/index.html">the manual</a>
and created my user and so on.
Then, I <code>nixos-rebuild switch</code>ed.
And because I copied my whole <code>configuration.nix</code> setup from my old drive,
everything got build for me.</p>

<p>After some more <code>nix-env -iA</code> calls (because some things only live in my user
environment), I fully restored my system.
Awesome!</p>

<h1 id="conclusion" id="conclusion">Conclusion</h1>

<p>Installing NixOS from NixOS works really nice.
You have to be careful with some things, UUIDs and so on, but overall it is
rather simple.</p>

<p>Anyways, you benefit if you really <em>know</em> your system.
I wouldn&#39;t necessarily recommend this to an inexperienced NixOS user – hacking
things into the TTYs and getting a rescue shell for fixing the installation is
no thing that a newbie really wants to do – except for learing and if backups
are at hand!</p>

<p>Because of the awesomeness of NixOS and the <code>configuration.nix</code> file, I was able
to rebuild my complete system within a few minutes.
Despite my extensive adaptions in my <code>configuration.nix</code> file – speaking of
container setup, custom compile flags for packages, custom vim setup with
plugins compiled into the vim derivation (and the same again for neovim),
hundreds of packages and stuff – I was able to rebuild my system without much
effort.</p>

<p>Overall, leaving out the UUID fail, I think I am able to redo a complete setup
(including syncing <code>/home</code>, which was ~100GB data, and reinstalling everything)
in maybe 90 minutes, depending on how fast the internet connection is for
downloading binaries.</p>

<p>One could even mount the old <code>/nix/store</code> from the old installation and copy
over derivations, which would be a hell lot faster and would result in a
reinstallation without the need for internet access.
But I don&#39;t know how to do it, so I leave it as exercise to the reader.</p>

<p>tags:  <a href="https://beyermatthias.de/tag:desktop" class="hashtag"><span>#</span><span class="p-category">desktop</span></a> <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://beyermatthias.de/tag:nix" class="hashtag"><span>#</span><span class="p-category">nix</span></a> <a href="https://beyermatthias.de/tag:nixos" class="hashtag"><span>#</span><span class="p-category">nixos</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/how-to-install-nixos-from-nixos</guid>
      <pubDate>Thu, 23 Feb 2017 16:41:07 +0100</pubDate>
    </item>
    <item>
      <title>My switch to XFCE</title>
      <link>https://beyermatthias.de/my-switch-to-xfce</link>
      <description>&lt;![CDATA[I switched to xfce.&#xA;Yes, I really did, after more than 6 years on i3.&#xA;&#xA;Here&#39;s why.&#xA;&#xA;!-- more --&#xA;&#xA;Right now, I&#39;m writing this very blog post in gvim in a xterm on xfce4-12.&#xA;Why did I leave i3? Well... I love i3, I really do.&#xA;It is the perfect tool for beeing productive with a lot of terminals.&#xA;&#xA;Although, I have noticed that I use tmux more and more lately.&#xA;Having a terminal multiplexer at hand means you don&#39;t have many terminals&#xA;anymore.&#xA;&#xA;So I thought: Switch away from i3?&#xA;&#xA;I thought about switching to a framebuffer terminal, moving away from X11&#xA;entirely.&#xA;I could have used elinks, tmux, mutt, newsbeuter, rtv, rangern, of&#xA;course vim and so on... but only on a framebuffer terminal.&#xA;&#xA;But that wouldn&#39;t work well with multi-monitor setups.&#xA;I thought about KDE5, a lot actually.&#xA;But KDE is too heavy for me.&#xA;&#xA;So what is a good alternative to KDE, leightweight, has nice performance but&#xA;also looks nice?&#xA;Yes, XFCE!&#xA;&#xA;And so far, I really love it!&#xA;&#xA;The only problem I have is, of course, syncing of configurations via git.&#xA;It seems that XFCE writes state information to the configuration files as&#xA;well, which is unfortunate.&#xA;What I will do: Not track the configurations except maybe the keyboard&#xA;bindings.&#xA;I hope that&#39;ll do.&#xA;&#xA;So I have a nice-looking desktop environment now, which has nice keybindings&#xA;for doing all the things I did with i3 as well - speaking of tiling.&#xA;I configured the XFCE desktop to do basic tiling like i3, yes.&#xA;That gives me the same productivity I had with i3 before.&#xA;One thing I couldn&#39;t figure out by now is how to switch the focused monitor&#xA;with a keybinding.&#xA;That might not be possible at all, which would be unfortunate, though I guess&#xA;I can live with that.&#xA;&#xA;A nice side effect of my new setup: People I work with don&#39;t think &#34;What a&#xA;hell of a nerd&#34; anymore.&#xA;Not that I care about what other people think, but this way they might get the&#xA;impression that Linux on the Desktop rocks - and I guess this is a nice thing&#xA;to have, isn&#39;t it?&#xA;&#xA;tags:  #software #linux #desktop #life&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I switched to xfce.
Yes, I really did, after more than 6 years on i3.</p>

<p>Here&#39;s why.</p>



<p>Right now, I&#39;m writing this very blog post in <em>gvim</em> in a xterm on <em>xfce4-12</em>.
Why did I leave i3? Well... I love i3, I really do.
It is the perfect tool for beeing productive with a lot of terminals.</p>

<p>Although, I have noticed that I use <em>tmux</em> more and more lately.
Having a terminal multiplexer at hand means you don&#39;t have many terminals
anymore.</p>

<p>So I thought: Switch away from i3?</p>

<p>I thought about switching to a framebuffer terminal, moving away from X11
entirely.
I could have used <em>elinks</em>, <em>tmux</em>, <em>mutt</em>, <em>newsbeuter</em>, <em>rtv</em>, <em>rangern</em>, of
course <em>vim</em> and so on... but only on a framebuffer terminal.</p>

<p>But that wouldn&#39;t work well with multi-monitor setups.
I thought about KDE5, a lot actually.
But KDE is too heavy for me.</p>

<p>So what is a good alternative to KDE, leightweight, has nice performance but
also looks nice?
Yes, XFCE!</p>

<p>And so far, I really love it!</p>

<p>The only problem I have is, of course, syncing of configurations via git.
It seems that XFCE writes state information to the configuration files as
well, which is unfortunate.
What I will do: Not track the configurations except maybe the keyboard
bindings.
I hope that&#39;ll do.</p>

<p>So I have a nice-looking desktop environment now, which has nice keybindings
for doing all the things I did with i3 as well – speaking of tiling.
I configured the XFCE desktop to do basic tiling like i3, yes.
That gives me the same productivity I had with i3 before.
One thing I couldn&#39;t figure out by now is how to switch the focused monitor
with a keybinding.
That might not be possible at all, which would be unfortunate, though I guess
I can live with that.</p>

<p>A nice side effect of my new setup: People I work with don&#39;t think “What a
hell of a nerd” anymore.
Not that I care about what other people think, but this way they might get the
impression that Linux on the Desktop rocks – and I guess this is a nice thing
to have, isn&#39;t it?</p>

<p>tags:  <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://beyermatthias.de/tag:desktop" class="hashtag"><span>#</span><span class="p-category">desktop</span></a> <a href="https://beyermatthias.de/tag:life" class="hashtag"><span>#</span><span class="p-category">life</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/my-switch-to-xfce</guid>
      <pubDate>Thu, 02 Feb 2017 16:38:09 +0100</pubDate>
    </item>
  </channel>
</rss>