<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>desktop &amp;mdash; musicmatzes blog</title>
    <link>https://beyermatthias.de/tag:desktop</link>
    <description></description>
    <pubDate>Mon, 12 Oct 2026 05:31:04 +0200</pubDate>
    <item>
      <title>Booting old NixOS</title>
      <link>https://beyermatthias.de/booting-old-nixos</link>
      <description>&lt;![CDATA[My between-the-years project was trying to use my old Thinkpad to run some local&#xA;services, for example MPD.&#xA;I thought, that the Thinkpad did not even have a drive anymore, and was&#xA;surprised to find a 256GB SSD inside of it - with nixos still installed!&#xA;&#xA;AND RUNNING!&#xA;&#xA;So, after almost two years, I booted my old Thinkpad, entered the crypto&#xA;password for the harddrive, and got greeted with a login screen and an i3&#xA;instance. Firefox asked whether I want to start the old session again...&#xA;everything just worked.&#xA;&#xA;I was amazed.&#xA;&#xA;Well, this is not the crazy thing I wanted to write about here.&#xA;The problem now was: I update and deploy my devices using krops nowadays. This&#xA;old installation had root login disabled, which is required for krops to work...&#xA;&#xA;But, because nixos is awesome,... I did nothing more than checking out the git&#xA;commit the latest generation on the Thinkpad was booted from, modified some&#xA;settings for ssh server and root user ... rebuild the system and switched to the&#xA;new build... and then started deployment for the new nixos 20.09 installation&#xA;using krops.&#xA;&#xA;All without hassle.&#xA;I might run out of disk space now, because this deployes a full KDE Plasma 5&#xA;installation, but honestly it would surprise me... there should be enough space.&#xA;I am curious, though, whether KDE Plasma 5 runs on the device.&#xA;We&#39;ll see...&#xA;&#xA;tags: #nixos #desktop&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>My between-the-years project was trying to use my old Thinkpad to run some local
services, for example MPD.
I thought, that the Thinkpad did not even have a drive anymore, and was
surprised to find a 256GB SSD inside of it – with nixos still installed!</p>

<p>AND RUNNING!</p>

<p>So, after almost two years, I booted my old Thinkpad, entered the crypto
password for the harddrive, and got greeted with a login screen and an i3
instance. Firefox asked whether I want to start the old session again...
everything just worked.</p>

<p>I was amazed.</p>

<p>Well, this is not the crazy thing I wanted to write about here.
The problem now was: I update and deploy my devices using krops nowadays. This
old installation had root login disabled, which is required for krops to work...</p>

<p>But, because nixos is awesome,... I did nothing more than checking out the git
commit the latest generation on the Thinkpad was booted from, modified some
settings for ssh server and root user ... rebuild the system and switched to the
new build... and then started deployment for the new nixos 20.09 installation
using krops.</p>

<p>All without hassle.
I might run out of disk space now, because this deployes a full KDE Plasma 5
installation, but honestly it would surprise me... there should be enough space.
I am curious, though, whether KDE Plasma 5 runs on the device.
We&#39;ll see...</p>

<p>tags: <a href="https://beyermatthias.de/tag:nixos" class="hashtag"><span>#</span><span class="p-category">nixos</span></a> <a href="https://beyermatthias.de/tag:desktop" class="hashtag"><span>#</span><span class="p-category">desktop</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/booting-old-nixos</guid>
      <pubDate>Sat, 26 Dec 2020 17:40:13 +0100</pubDate>
    </item>
    <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>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>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>