<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cobra's bits (Posts about desktop)</title><link>https://cobra.pdes-net.org</link><description></description><atom:link href="https://cobra.pdes-net.org/categories/desktop.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2024 &lt;a href="mailto:najahannah@gmail.com"&gt;Cobra&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-NC-SA"
style="border-width:0; margin-bottom:12px;"
src="../images/by-nc-sa.svg"&gt;&lt;/a&gt;</copyright><lastBuildDate>Sun, 16 Jun 2024 12:23:41 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Ich glotz TV</title><link>https://cobra.pdes-net.org/posts/ich-glotz-tv.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;Well, actually I've essentially stopped watching linear TV about 20 years ago. My Loewe CRT TV set I'd bought in 1994 didn't take kindly to that and twice suffered from dried-up electrolyte capacitors. “You have to switch on the TV at least &lt;em&gt;sometimes&lt;/em&gt;”, said the electronics guy who repaired the set. When it happened the third time, I didn't bother anymore, but lived without dedicated TV set for the next 5 years. My first flat-screen TV purchased in 2010 suffered the same fate when it all of a sudden developed dead pixel rows, resulting in a rapidly increasing number of black lines across the display.&lt;/p&gt;
&lt;p&gt;It was not until 2018 when I finally gave in and bought a new TV set with the explicit purpose to enjoy the FIFA World Cup held this year. You all know that from a German perspective, this word cup was as much of a disaster as the following one in 2022. Regardless, the 65" QLED panel with three-sided ambilight is perfect for enjoying the occasional movie from my NAS or Amazon Prime Video.&lt;/p&gt;
&lt;p&gt;This panel creates a high level of immersion due to its sheer size and the light surrounding it, providing a near cinematic experience for movies in FullHD and 4K resolution. For anything else the immersion may be a bit overwhelming, particularly if one is not willing to fully focus on the action displayed. For me, that's often the case when watching a football match, or a documentary on publicly broadcasted TV, and I would prefer to be able to watch the TV channel on my notebook with one eye while doing other stuff in the background.&lt;/p&gt;
&lt;p&gt;Instead of a flull-fledged IPTV application such as &lt;a class="reference external" href="https://aur.archlinux.org/packages/hypnotix"&gt;hypnotix,&lt;/a&gt; I thought that a simple script may be more suitable to my needs. The script I've found on &lt;a class="reference external" href="https://wiki.archlinux.de/title/Live-Tv"&gt;archlinux.de&lt;/a&gt; was basically just what I needed. I've merely integrated the download of the current URLs (done by a python script by Axel-Erfurt I've reproduced below), cleaned up a bit, and formatted it for zenity. I've also excluded some redundant channels to keep the list from cluttering.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code bash"&gt;&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-1" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-1" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-1"&gt;&lt;/a&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-2" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-2" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-2"&gt;&lt;/a&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-3" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-3" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-3"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# Original livetv script by tuxnix and Mis,&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-4" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-4" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-4"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# see `https://wiki.archlinux.de/title/Live-Tv &amp;lt;https://wiki.archlinux.de/title/Live-Tv&amp;gt;`_&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-5" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-5" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-5"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# liveiptvstations.py by Axel-Erfurt,&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-6" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-6" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-6"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# see `https://gist.github.com/Axel-Erfurt/5106f9bbef1fca1d63bb74a849607128 &amp;lt;https://gist.github.com/Axel-Erfurt/5106f9bbef1fca1d63bb74a849607128&amp;gt;`_&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-7" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-7" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-7"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# Also see `https://wiki.ubuntuusers.de/Internet-TV/Stationen/ &amp;lt;https://wiki.ubuntuusers.de/Internet-TV/Stationen/&amp;gt;`_&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-8" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-8" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-8"&gt;&lt;/a&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-9" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-9" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-9"&gt;&lt;/a&gt;&lt;span class="nv"&gt;script_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;dirname&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$0&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-10" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-10" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-10"&gt;&lt;/a&gt;&lt;span class="nv"&gt;script_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;basename&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$0&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-11" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-11" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-11"&gt;&lt;/a&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-12" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-12" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-12"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# Pull down a current list of IPTV channels&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-13" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-13" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-13"&gt;&lt;/a&gt;liveiptvstations.py&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;channellist.txt
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-14" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-14" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-14"&gt;&lt;/a&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-15" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-15" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-15"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# Basic formatting&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-16" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-16" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-16"&gt;&lt;/a&gt;sed&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'N;s/:\n/ /'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'s/^/FALSE /'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;channellist.txt
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-17" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-17" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-17"&gt;&lt;/a&gt;sed&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s/ARD Alpha/ARD.alpha/"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s/ARD ONE/ARD.one/"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s/MDR Sachsen/MDR/"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s/BR Süd/BR/"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s/NDR Hamburg/NDR/"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s/RBB Berlin/RBB/"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s/SWR BW/SWR/"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s/WDR (Deutschland)/WDR/"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;channellist.txt
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-18" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-18" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-18"&gt;&lt;/a&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-19" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-19" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-19"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# Remove some redundant channels (optional, but beware they need formatting if included)&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-20" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-20" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-20"&gt;&lt;/a&gt;sed&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Tagesschau/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/ARTE.FR/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/ORF/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Brandenburg/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Anhalt/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Thüringen/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Mecklenburg-Vorpommern/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Niedersachsen/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Schleswig-Holstein/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Lokalzeit/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/weltweit/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/BR Nord/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/SWR RP/d"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;channellist.txt
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-21" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-21" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-21"&gt;&lt;/a&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-22" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-22" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-22"&gt;&lt;/a&gt;&lt;span class="c1"&gt;#create oneliner for zenity&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-23" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-23" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-23"&gt;&lt;/a&gt;&lt;span class="nv"&gt;channel_list&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;paste&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;' '&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;channellist.txt&lt;span class="k"&gt;)&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-24" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-24" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-24"&gt;&lt;/a&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-25" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-25" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-25"&gt;&lt;/a&gt;&lt;span class="nv"&gt;stream_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;zenity&lt;span class="w"&gt; &lt;/span&gt;--list&lt;span class="w"&gt; &lt;/span&gt;--title&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Live IPTV channels"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--text&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Choose a channel:"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--radiolist&lt;span class="w"&gt;  &lt;/span&gt;--column&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--column&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Channel"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--column&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"URL"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--print-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$channel_list&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-26" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-26" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-26"&gt;&lt;/a&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-27" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-27" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-27"&gt;&lt;/a&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;((&lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-28" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-28" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-28"&gt;&lt;/a&gt;&lt;span class="w"&gt;        &lt;/span&gt;mpv&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;stream_url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-29" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-29" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-29"&gt;&lt;/a&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;exec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;script_path&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;script_name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-30" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-30" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-30"&gt;&lt;/a&gt;&lt;span class="k"&gt;else&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-31" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-31" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-31"&gt;&lt;/a&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Leaving LiveTV"&lt;/span&gt;
&lt;a id="rest_code_c6129af31b474b1d83a5f44773bd9c6c-32" name="rest_code_c6129af31b474b1d83a5f44773bd9c6c-32" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_c6129af31b474b1d83a5f44773bd9c6c-32"&gt;&lt;/a&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="code"&gt;&lt;pre class="code python"&gt;&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-1" name="rest_code_ad69224b6803496194900c1a33e3536b-1" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-1"&gt;&lt;/a&gt;&lt;span class="ch"&gt;#!/usr/bin/python&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-2" name="rest_code_ad69224b6803496194900c1a33e3536b-2" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-2"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-3" name="rest_code_ad69224b6803496194900c1a33e3536b-3" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-3"&gt;&lt;/a&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;requests&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-4" name="rest_code_ad69224b6803496194900c1a33e3536b-4" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-4"&gt;&lt;/a&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;json&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-5" name="rest_code_ad69224b6803496194900c1a33e3536b-5" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-5"&gt;&lt;/a&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-6" name="rest_code_ad69224b6803496194900c1a33e3536b-6" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-6"&gt;&lt;/a&gt;&lt;span class="c1"&gt;# see https://gist.github.com/Axel-Erfurt/5106f9bbef1fca1d63bb74a849607128&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-7" name="rest_code_ad69224b6803496194900c1a33e3536b-7" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-7"&gt;&lt;/a&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-8" name="rest_code_ad69224b6803496194900c1a33e3536b-8" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-8"&gt;&lt;/a&gt;&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://raw.githubusercontent.com/mediathekview/MServer/master/dist/live-streams.json"&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-9" name="rest_code_ad69224b6803496194900c1a33e3536b-9" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-9"&gt;&lt;/a&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-10" name="rest_code_ad69224b6803496194900c1a33e3536b-10" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-10"&gt;&lt;/a&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-11" name="rest_code_ad69224b6803496194900c1a33e3536b-11" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-11"&gt;&lt;/a&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-12" name="rest_code_ad69224b6803496194900c1a33e3536b-12" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-12"&gt;&lt;/a&gt;&lt;span class="n"&gt;js&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-13" name="rest_code_ad69224b6803496194900c1a33e3536b-13" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-13"&gt;&lt;/a&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-14" name="rest_code_ad69224b6803496194900c1a33e3536b-14" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-14"&gt;&lt;/a&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;parse_object_pairs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pairs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-15" name="rest_code_ad69224b6803496194900c1a33e3536b-15" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-15"&gt;&lt;/a&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;pairs&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-16" name="rest_code_ad69224b6803496194900c1a33e3536b-16" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-16"&gt;&lt;/a&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-17" name="rest_code_ad69224b6803496194900c1a33e3536b-17" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-17"&gt;&lt;/a&gt;&lt;span class="n"&gt;decoder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;JSONDecoder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;object_pairs_hook&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;parse_object_pairs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-18" name="rest_code_ad69224b6803496194900c1a33e3536b-18" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-18"&gt;&lt;/a&gt;&lt;span class="n"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;decoder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-19" name="rest_code_ad69224b6803496194900c1a33e3536b-19" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-19"&gt;&lt;/a&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-20" name="rest_code_ad69224b6803496194900c1a33e3536b-20" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-20"&gt;&lt;/a&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:]:&lt;/span&gt;
&lt;a id="rest_code_ad69224b6803496194900c1a33e3536b-21" name="rest_code_ad69224b6803496194900c1a33e3536b-21" href="https://cobra.pdes-net.org/posts/ich-glotz-tv.html#rest_code_ad69224b6803496194900c1a33e3536b-21"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;" Livestream"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</description><category>desktop</category><category>linux</category><guid>https://cobra.pdes-net.org/posts/ich-glotz-tv.html</guid><pubDate>Sun, 29 Jan 2023 14:00:13 GMT</pubDate></item><item><title>Uptime</title><link>https://cobra.pdes-net.org/posts/uptime.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;This blog runs on a very affordable vServer hosted by netcup. For such low-end servers, no uptime guarantees are given by any hoster. Nevertheless, I always get mails whenever the server is down either for maintenance or because its temporarily out of order, and my feeling is that this happens only rarely. But just out of curiosity, I'd like to know what the actual uptime is.&lt;/p&gt;
&lt;p&gt;A two page article in c't 26/2021 introduced me to uptime-kuma, which seemed to fit nicely what I was looking for. The only part I didn't like was the statement “Der einfachste und schnellste Weg Uptime-Kuma zu installieren, führt über Docker und Docker-Compose” followed by an installation procedure that I would call anything else then simple and fast. Fortunately, this statement applies only to the distributions favored by the c't. On Arch, the following two commands install and start uptime-kuma as a service:&lt;/p&gt;
&lt;pre class="literal-block"&gt;yay -S uptime-kuma
systemctl enable --now uptime-kuma.service&lt;/pre&gt;
&lt;p&gt;After configuring the services to monitor and a day of collecting data, their uptime status is displayed on &lt;a class="reference external" href="https://localhost/3001"&gt;https://localhost/3001&lt;/a&gt; as shown below for the web and IRC servers on pdes-net.org:&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://cobra.pdes-net.org/images/kuma1.webp"&gt;
&lt;img alt="../images/kuma1.webp" class="align-center" src="https://cobra.pdes-net.org/images/kuma1.webp" style="width: 800px;"&gt;
&lt;/a&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;a class="reference external image-reference" href="https://cobra.pdes-net.org/images/kuma2.webp"&gt;
&lt;img alt="../images/kuma2.webp" class="align-center" src="https://cobra.pdes-net.org/images/kuma2.webp" style="width: 800px;"&gt;
&lt;/a&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;a class="reference external image-reference" href="https://cobra.pdes-net.org/images/kuma3.webp"&gt;
&lt;img alt="../images/kuma3.webp" class="align-center" src="https://cobra.pdes-net.org/images/kuma3.webp" style="width: 800px;"&gt;
&lt;/a&gt;</description><category>desktop</category><category>linux</category><category>web</category><guid>https://cobra.pdes-net.org/posts/uptime.html</guid><pubDate>Sun, 01 May 2022 13:41:26 GMT</pubDate></item><item><title>Too many meetings</title><link>https://cobra.pdes-net.org/posts/too-many-meetings.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;The number of meetings I'm requested to attend has increased by roughly a factor of five over the last two decades. Instead of five meetings per week I'm currently having five per day on average. It thus doesn't come as a surprise that I depend on an electronic calendar to organize and get reminded of all these appointments.&lt;/p&gt;
&lt;p&gt;On my desktops, I'm using the integrated calendar of &lt;a class="reference external" href="https://en.wikipedia.org/wiki/GNOME_Evolution"&gt;evolution&lt;/a&gt; since seven years. Over the time, this implementation of a PIM for the Gnome desktop has proven itself to be reliable and stable, in contrast to &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Kontact"&gt;Kontact&lt;/a&gt;, its KDE counterpart I've &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/revolution.html"&gt;tried to use before&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In any case, having a calendar on my desktops is not sufficient anymore, as future appointments are typically arranged after Zoom meetings that I usually attend with my &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/maxi.html"&gt;notebook&lt;/a&gt;. And even that is not enough: I may want to check my appointments on a whim in the middle of the night, where only my &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/resistance-is-futile.html"&gt;smartphone&lt;/a&gt; is immediately accessible. In either case, I do not need a full-blown PIM, but just a calendar client synchronizing with both owncloud/nextcloud and zimbra.&lt;/p&gt;
&lt;p&gt;On Linux/GTK, I thought that &lt;a class="reference external" href="https://www.linuxadictos.com/en/la-aplicacion-de-calendarios-de-gnome-empieza-el-2020-bien-organizado.html"&gt;gnome-calendar&lt;/a&gt; would be the natural candidate with this functionality. To my surprise it's straightforward to add an owncloud/nextcloud account with the associated calendar, but zimbra is not part of the online account collection of Gnome, nor is a generic CalDAV server. I found that almost impossible to believe, but it's in fact a &lt;a class="reference external" href="https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/1"&gt;longstanding bug&lt;/a&gt; (eight years!) that has still to be acknowledged and addressed by the developers. Fortunately, there's a simple workaround: after installing evolution and adding the zimbra CalDAV server there, it also shows up in gnome-calendar. Apart from this issue, gnome-calendar delivers exactly what I wanted.&lt;/p&gt;
&lt;p&gt;This entire affair is a whole lot easier on Android. &lt;a class="reference external" href="https://f-droid.org/en/packages/at.bitfire.davdroid/"&gt;Davx5&lt;/a&gt; available on F-Droid provides a convenient backend for any number of CalDAV servers, and any calendar app will serve as frontend. It works just as well as gnome-calendar on my notebook, but without any unexpected obstacles during the configuration of the calendars.&lt;/p&gt;
&lt;p&gt;I'm now reminded of outstanding appointments wherever I walk and talk. That's progess! Or is it?&lt;/p&gt;</description><category>desktop</category><category>linux</category><category>web</category><guid>https://cobra.pdes-net.org/posts/too-many-meetings.html</guid><pubDate>Sun, 13 Mar 2022 13:01:13 GMT</pubDate></item><item><title>Hidden settings</title><link>https://cobra.pdes-net.org/posts/hidden-settings.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;Since I've quit KDE, and desktop environments in general, I'm primarily using applications developed for LXDE, XFCE, and Gnome. I have no problems with the former two, but I keep having conceptual difficulties with the ideologically driven minimalism of the latter. Take file managers and their associated terminal, for example. In PCManFM (LXDE), for example, one can change the associated terminal as expected in the program's preferences. Same in Thunar (XFCE). But of course not in Nautilus (Gnome) or any of its forks such as, for example, Nemo (Cinnamon). All of these “nonessential” settings have been dispelled to &lt;code class="docutils literal"&gt;dconf&lt;/code&gt;, the ‘registry’ of Gnome, which can be accessed either with the dconf-editor or the command-line tool &lt;code class="docutils literal"&gt;gsettings&lt;/code&gt;. For example, the following command changes the terminal associated with nemo to sakura:&lt;/p&gt;
&lt;pre class="literal-block"&gt;gsettings set org.cinnamon.desktop.default-applications.terminal exec 'sakura'&lt;/pre&gt;
&lt;p&gt;I hope to remember that the next time instead of spending an eternity in the preferences again.&lt;/p&gt;</description><category>desktop</category><category>linux</category><guid>https://cobra.pdes-net.org/posts/hidden-settings.html</guid><pubDate>Thu, 01 Apr 2021 07:34:07 GMT</pubDate></item><item><title>Modern times</title><link>https://cobra.pdes-net.org/posts/modern-times.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;Since the beginning of time (or so it seems), I've had &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Emacs"&gt;Emacs&lt;/a&gt; installed with the extension &lt;a class="reference external" href="https://en.wikipedia.org/wiki/AUCTeX"&gt;AUCTeX&lt;/a&gt; to handle LaTeX documents. And, mind you, I'm still using it from time to time! As a matter of fact, in 2018 I've worked on a number of manuscripts exclusively with Emacs to prepare myself for the editor shootout I've &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/yay.html"&gt;promised&lt;/a&gt; for the end of 2018 (and which may or may not be done by the end of this year). I'm still quite happy with it, that much I can say already now.&lt;/p&gt;
&lt;p&gt;Perhaps you can then understand my surprise when &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/yay.html"&gt;yay&lt;/a&gt; told me that AUCTeX has been orphaned on the AUR. I was even more surprised when I saw that the maintainer was Stefan Husmann, who is also the maintainer of several hundred other packages and a moderator on the &lt;a class="reference external" href="https://bbs.archlinux.de/"&gt;German Archlinux forum&lt;/a&gt;. Not the guy to thoughtlessly abandon a package on a mere whim.&lt;/p&gt;
&lt;p&gt;And then it hit me: of course! Emacs has got it's own package manager (&lt;a class="reference external" href="https://elpa.gnu.org/"&gt;ELPA&lt;/a&gt;) some time, well, perhaps two years ... &lt;a class="reference external" href="https://lists.gnu.org/archive/html/info-gnu-emacs/2012-06/msg00000.html"&gt;actually, eight years ago&lt;/a&gt;. 😣&lt;/p&gt;
&lt;p&gt;So what's the meaning of this post? Let's say that there're one billion computer users out there. Only one percent of these know what an editor is, and only one percent of these again are actually using one. Of these again, only one percent use Emacs. Once again one percent of these Emacs users use AUCTeX, but more than 80% of these guys have installed AUCTeX via ELPA, the recommended and canonical way. I'm not one of them. Am I the only one? No, if we do the math, it turns out that there's one kindred spirit who is in the same situation like me. This post is for you, my brother in arms!&lt;/p&gt;
&lt;p&gt;Well, as stated above, Emacs recommends installing AUCTeX via ELPA. After removing AUCTeX from the AUR, we can install manually&lt;/p&gt;
&lt;pre class="literal-block"&gt;M-x package-install RET
auctex&lt;/pre&gt;
&lt;p&gt;or, in a properly maintained init.el (like mine), automatically:&lt;/p&gt;
&lt;pre class="literal-block"&gt;(require 'package)

(add-to-list 'package-archives
        '("melpa" . "`https://melpa.org/packages/" &amp;lt;https://melpa.org/packages/"&amp;gt;`_))

(package-initialize)
(when (not package-archive-contents)
        (package-refresh-contents))

(defvar myPackages
   '(better-defaults
         material-theme
         ein
         elpy
         flycheck
         py-autopep8
         ac-math
         auctex
         auto-complete-auctex
         ))

(mapc #'(lambda (package)
        (unless (package-installed-p package)
          (package-install package)))
          myPackages)&lt;/pre&gt;
&lt;p&gt;&lt;a class="reference external" href="https://tex.stackexchange.com/questions/450956/cannot-load-preview-latex-despite-auctex-already-installed"&gt;and&lt;/a&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;;;(load "auctex.el" nil t t)
;;(load "preview-latex.el" nil t t)&lt;/pre&gt;
&lt;p&gt;While I was pondering the question whether this post would be relevant for anybody at all, I found these news: &lt;a class="reference external" href="http://www.pell.portland.or.us/~orc/Code/levee/"&gt;Levee, a vi clone, has got a new major release after 30 years&lt;/a&gt;. Now that's the spirit! Compared to the estimated number of users interested in this update (interestingly, the &lt;a class="reference external" href="https://aur.archlinux.org/packages/levee/#comment-759865"&gt;only comment&lt;/a&gt; in the AUR is from Stefan Husmann), my post is for the masses. To celebrate this Chucknorishness of software development, I've installed levee and prepared this text in it. It was ok (just like vi), but David Parsons will certainly understand if I say that I prefer vim for everyday work.&lt;/p&gt;</description><category>desktop</category><category>latex</category><category>linux</category><guid>https://cobra.pdes-net.org/posts/modern-times.html</guid><pubDate>Sat, 05 Sep 2020 11:52:22 GMT</pubDate></item><item><title>SOHO system monitoring</title><link>https://cobra.pdes-net.org/posts/soho-system-monitoring.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;I have to admit that when computers are concerned, I'm somewhat of a control freak: for &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/blind-and-deaf.html"&gt;more than 20 years&lt;/a&gt;, a system monitor is an integral part of my desktop. Since the last 10 years, conky fills this role. Conky can be configured exactly to one's liking and actually may be a &lt;a class="reference external" href="https://www.pinterest.com/or1gb1u3/linux-conkey-config-ideas/"&gt;quite stylish element&lt;/a&gt; of the desktop. My conkies rather display a maximum of information while still being aesthetically pleasing (for me). Judge for yourself:&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;a class="reference external image-reference" href="https://cobra.pdes-net.org/images/conky_on_lifebook_99.webp"&gt;
&lt;img alt="../images/conky_on_lifebook_99.webp" class="align-center" src="https://cobra.pdes-net.org/images/conky_on_lifebook_99.webp" style="width: 800px;"&gt;
&lt;/a&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can get the configuration file &lt;a class="reference external" href="https://pdes-net.org/scripts/conkyrc_system"&gt;here,&lt;/a&gt; if you are interested.&lt;/p&gt;
&lt;p&gt;Now, having an active element on the desktop can be distracting, and I understand that this may not be to everyone's liking (although I myself feel entirely detached from the system I'm working on without this direct view into the engine room). Besides, configuring conkies is also not something you could call simple and intuitive.&lt;/p&gt;
&lt;p&gt;If you are a private or SOHO user, and are interested in an on-demand system monitor, it doesn't really help looking at the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/System_monitor#List_of_software_monitors"&gt;list of system monitors&lt;/a&gt; available on Wikipedia. For example, in the office we are quite happy with &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Nagios"&gt;Nagios&lt;/a&gt; for monitoring the health of a few dozen servers, but it would be a bizarre overkill to employ it for the few systems in a SOHO situation.&lt;/p&gt;
&lt;p&gt;If it's about monitoring a single system, the most obvious choice is &lt;a class="reference external" href="https://github.com/aristocratos/bashtop"&gt;bashtop&lt;/a&gt;, or, after a port to Python that happened just two weeks ago, &lt;a class="reference external" href="https://github.com/aristocratos/bpytop"&gt;bpytop,&lt;/a&gt; a system monitor for the command line that I'd mentioned already &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/working-on-the-command-line.html"&gt;in a previous post&lt;/a&gt;. An interesting alternative that is graphically more spartan but no less capable is &lt;a class="reference external" href="https://nicolargo.github.io/glances/"&gt;glances&lt;/a&gt;. Neither of these programs require configuration; they all work out of the box. Here are two screenshots showing bpytop running in mosh sessions on pdes-net.org and blackvelvet, my desktop. The former is virtualized and thus lacks CPU temperatures.&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;a class="reference external image-reference" href="https://cobra.pdes-net.org/images/bpytop_pdes_99.webp"&gt;
&lt;img alt="../images/bpytop_pdes_99.webp" class="align-center" src="https://cobra.pdes-net.org/images/bpytop_pdes_99.webp" style="width: 800px;"&gt;
&lt;/a&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;a class="reference external image-reference" href="https://cobra.pdes-net.org/images/bpytop_blackvelvet_99.webp"&gt;
&lt;img alt="../images/bpytop_blackvelvet_99.webp" class="align-center" src="https://cobra.pdes-net.org/images/bpytop_blackvelvet_99.webp" style="width: 800px;"&gt;
&lt;/a&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If bashtop/bpytop isn't sufficient, but configuring Nagios too much, I'd recommend a look at &lt;a class="reference external" href="https://www.monitorix.org/"&gt;Monitorix,&lt;/a&gt; which requires very little configuration, and can be be accessed with a browser. I've deployed it on my office PC for being able to examine the computing resources on this system in very great detail from my living room. And that works really well: with the help of the Monitorix protocols, I can present solid evidence when asking for more RAM or storage place. 😎 Here's the very top of the monitorix report on my desktop, showing that I'm doing just fine with what I currently have. 😞&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;a class="reference external image-reference" href="https://cobra.pdes-net.org/images/monitorix.png"&gt;
&lt;img alt="../images/monitorix.png" class="align-center" src="https://cobra.pdes-net.org/images/monitorix.png" style="width: 800px;"&gt;
&lt;/a&gt;</description><category>desktop</category><category>linux</category><guid>https://cobra.pdes-net.org/posts/soho-system-monitoring.html</guid><pubDate>Sun, 16 Aug 2020 11:51:48 GMT</pubDate></item><item><title>Working on the command line</title><link>https://cobra.pdes-net.org/posts/working-on-the-command-line.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;I was looking for an introduction like “Due to the Corona crisis, ...”, as everybody does these days. Unfortunately, that won't work with the subject I'm going to talk about, namely, command line (CLI) applications, which I've used and liked in the pre-SARS-CoV-2 world just as much as now. I'm convinced &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/timeline.html"&gt;since ages&lt;/a&gt; that the CLI is, to state it with the words of &lt;a class="reference external" href="http://www.terminally-incoherent.com/blog/2012/05/30/command-line-and-user-friendliness/"&gt;Luke,&lt;/a&gt; “the most intuitive, most natural and easiest to grasp type of user interface we have invented so far”.&lt;/p&gt;
&lt;p&gt;But regardless of what I and others believe or not, lots of things &lt;em&gt;are&lt;/em&gt; simply best done on the command line. There's a catch, of course: that statement is only true &lt;em&gt;if&lt;/em&gt; &lt;em&gt;and only if&lt;/em&gt; we are equipped with the right tools. An ancient /bin/sh without tab completion and history search and no access to my toolbox is nothing but a nightmare. Correctly configured, however, nothing beats the CLI in terms of speed and economy.&lt;/p&gt;
&lt;p&gt;In the following, I'll provide a brief overview of the command line applications I'm regularly using for everyday duties such as server administration and file management, as well as a few more enjoyable activities. Two of my &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/learn-to-love-the-cli.html"&gt;earlier&lt;/a&gt; &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/toolchain.html"&gt;posts&lt;/a&gt; have a certain overlap with the present one, but a different focus. My list is of course by no means exhaustive: you can find many more interesting tools and gadgets, ranging from the useful to the bizarre (try &lt;a class="reference external" href="https://github.com/p-e-w/ternimal"&gt;ternimal&lt;/a&gt;). Excellent starting points are the curated lists provided by &lt;a class="reference external" href="https://github.com/agarrharr/awesome-cli-apps"&gt;Adam&lt;/a&gt; and &lt;a class="reference external" href="https://github.com/herrbischoff/awesome-command-line-apps#readme"&gt;Marcel.&lt;/a&gt; In addition, &lt;a class="reference external" href="https://github.com/chubin/awesome-console-services"&gt;Igor&lt;/a&gt; (the guy behind &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/weather-widget.html"&gt;wttr&lt;/a&gt;) compiled a list of web services available via the command line.&lt;/p&gt;
&lt;section id="shell"&gt;
&lt;h2&gt;Shell&lt;/h2&gt;
&lt;p&gt;Work on the command line starts with the &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/learn-to-love-the-cli.html"&gt;shell&lt;/a&gt;. The default in most distributions is the &lt;a class="reference external" href="https://www.gnu.org/software/bash/"&gt;bash&lt;/a&gt;, and in a few the &lt;a class="reference external" href="https://sourceforge.net/p/zsh/code/ci/master/tree/"&gt;zsh&lt;/a&gt;. Both require &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/learn-to-love-the-cli.html"&gt;extensive configuration&lt;/a&gt; to offer all features I'd like to see, and not all distributions provide such a custom setup (meaning, you got to do it). In contrast, &lt;a class="reference external" href="https://fishshell.com/"&gt;fish&lt;/a&gt; is very well configured out-of-the-box regardless of the distribution. For the typical bash one-liner copied from the interwebs, I usually follow this &lt;a class="reference external" href="https://fishshell.com/docs/current/index.html#executing-bash"&gt;advice&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="terminal"&gt;
&lt;h2&gt;Terminal&lt;/h2&gt;
&lt;p&gt;If we are not at the console, we need a &lt;a class="reference external" href="https://wiki.archlinux.org/index.php/List_of_applications/Utilities#Terminal_emulators"&gt;terminal emulator&lt;/a&gt;. I'm primarily using &lt;a class="reference external" href="https://gnunn1.github.io/tilix-web/"&gt;Tilix&lt;/a&gt; or, when resources are scarce, &lt;a class="reference external" href="http://guake-project.org/"&gt;Guake&lt;/a&gt; and &lt;a class="reference external" href="https://gnometerminator.blogspot.com/p/introduction.html"&gt;Terminator&lt;/a&gt;, but there are plenty of other choices.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="remote-shell"&gt;
&lt;h2&gt;Remote Shell&lt;/h2&gt;
&lt;p&gt;A lot of my everyday duties involve connecting to a remote server. Wherever possible, I do that by using a combination of &lt;a class="reference external" href="https://mosh.org/"&gt;mosh&lt;/a&gt; and &lt;a class="reference external" href="https://github.com/tmux/tmux/wiki"&gt;tmux&lt;/a&gt;, the benefits of which have been described, for example, by &lt;a class="reference external" href="https://blog.filippo.io/my-remote-shell-session-setup/"&gt;Filippo&lt;/a&gt; and &lt;a class="reference external" href="https://bnbalsamo.github.io/2019/06/09/work_from_anywhere.html"&gt;Brian&lt;/a&gt;. For example, I'd use&lt;/p&gt;
&lt;pre class="literal-block"&gt;mosh pdes-net.org --tmux new-session -s default&lt;/pre&gt;
&lt;p&gt;for connecting to and starting a new tmux session with the name 'default' on this server. I can detach with Ctrl+A-D and attach anytime again (also from an entirely different network) with&lt;/p&gt;
&lt;pre class="literal-block"&gt;mosh pdes-net.org --tmux a&lt;/pre&gt;
&lt;p&gt;Note that mosh requires some open UDP ports that may require configuration of the firewall (for which I'm utilizing &lt;a class="reference external" href="https://wiki.archlinux.org/index.php/Uncomplicated_Firewall"&gt;ufw&lt;/a&gt;, so it's as easy as 'ufw allow &amp;lt;port&amp;gt;/udp').&lt;/p&gt;
&lt;/section&gt;
&lt;section id="navigation-and-file-management"&gt;
&lt;h2&gt;Navigation and file management&lt;/h2&gt;
&lt;p&gt;Everybody with a certain sense of order tends to get pretty long path names, which are a nuisance to type regardless of tab completion. That's basically why file managers were invented! But there's a faster way: &lt;a class="reference external" href="https://github.com/wting/autojump"&gt;autojump.&lt;/a&gt; Instead of typing the path, you could just jump to it:&lt;/p&gt;
&lt;pre class="literal-block"&gt;cobra at deepgreen in ~
↪ j pra20_3
/home/cobra/ownCloud/MyStuff/projects/publications/uwe/pra20_1-3/pra20_3
cobra at deepgreen in ~/o/M/p/p/u/p/pra20_3
↪ j portfolio
/home/cobra/Documents/aur/portfolio
cobra at deepgreen in ~/D/a/portfolio
↪ j pdes
/home/cobra/ownCloud/MyStuff/Documents/pdes-net.org
cobra at deepgreen in ~/o/M/D/pdes-net.org
(blog) ↪&lt;/pre&gt;
&lt;p&gt;There are several tools similar to autojump, some more powerful, but in contrast to these, it's also officially available for Debian. And I'm used to it. ☺&lt;/p&gt;
&lt;p&gt;On systems with an SSD, I like to use &lt;a class="reference external" href="https://github.com/Canop/broot"&gt;broot,&lt;/a&gt; which is neither yet another autojumper, nor a full-blown file manager, but something in between. It's also nice as a tool to get information on file dates and sizes.&lt;/p&gt;
&lt;p&gt;As an actual file manager, I much prefer &lt;a class="reference external" href="https://github.com/jarun/nnn"&gt;nnn,&lt;/a&gt; although I always also install &lt;a class="reference external" href="https://github.com/ranger/ranger"&gt;ranger&lt;/a&gt; as well as the good old &lt;a class="reference external" href="https://midnight-commander.org/"&gt;mc&lt;/a&gt;. Don't underestimate the latter – it may look oldfashioned and outdated, but none of its more fashionable cousins allows, for example, remote sftp connections (although I usually simply use scp for copying files between remote locations). And there's another small but decisive difference between mc and nnn/ranger that may simplify file selection and renaming for most people (see the appendix to this post below).&lt;/p&gt;
&lt;p&gt;Commands one googles sooner or later:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;show/hide hidden files&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;nnn       .
ranger    zh
mc        Alt+.&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;disk usage&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;broot     :s
nnn       td or ta&lt;/pre&gt;
&lt;/section&gt;
&lt;section id="editor-and-other-utilities"&gt;
&lt;h2&gt;Editor and other utilities&lt;/h2&gt;
&lt;p&gt;There can only be one: &lt;a class="reference external" href="https://www.vim.org/"&gt;vim.&lt;/a&gt; Well: &lt;a class="reference external" href="https://neovim.io/"&gt;neovim&lt;/a&gt;. But that's it. 😉 In both cases, I use &lt;a class="reference external" href="https://github.com/junegunn/vim-plug"&gt;vim-plug&lt;/a&gt; as a plugin manager to load &lt;a class="reference external" href="https://github.com/mcchrish/nnn.vim"&gt;nnn&lt;/a&gt; as file opener (there is also a &lt;a class="reference external" href="https://github.com/francoiscabrol/ranger.vim"&gt;ranger plugin&lt;/a&gt;) and optionally &lt;a class="reference external" href="https://github.com/lervag/vimtex"&gt;vimtex&lt;/a&gt; whenever it's appropriate (although vim is not my primary TeX editor – a subject to which I will return in a forthcoming post). And if you really, really can handle neither vim nor emacs: try &lt;a class="reference external" href="https://micro-editor.github.io/"&gt;micro&lt;/a&gt;, it's the better nano. 😉&lt;/p&gt;
&lt;p&gt;I put all documents that are still being edited under local version control. For this very simple task, I prefer &lt;a class="reference external" href="https://www.mercurial-scm.org/"&gt;mercurial&lt;/a&gt; over &lt;a class="reference external" href="https://git-scm.com/"&gt;git&lt;/a&gt; because of the former's humanly readable version numbers (I just find it more natural and less demanding to address a commit with a natural number than with a hash). For LaTeX documents, I use &lt;a class="reference external" href="https://bitbucket.org/paulhiemstra/scm-latexdiff/src/default/"&gt;scm-latexdiff&lt;/a&gt; to create diffs out of previous version managed by mercurial. And finally, I backup all of my documents and data with &lt;a class="reference external" href="https://borgbackup.readthedocs.io/en/stable/"&gt;borg&lt;/a&gt; and &lt;a class="reference external" href="https://rsync.samba.org/"&gt;rsync&lt;/a&gt; (and in future, also with &lt;a class="reference external" href="https://rclone.org/"&gt;rclone&lt;/a&gt;) as described in detail in my &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/a-simple-automated-backup-scheme.html"&gt;previous post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Whatever I'm working on, it surely involves quick check on numbers, some simple, some involved. A lot of these can be done by &lt;a class="reference external" href="https://github.com/Qalculate/libqalculate"&gt;qalc,&lt;/a&gt; a very versatile general purpose calculator, which has replaced &lt;a class="reference external" href="https://github.com/lcn2/calc"&gt;calc&lt;/a&gt; after I've discovered that &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/calculators.html"&gt;qalculate!&lt;/a&gt; also has a CLI...&lt;/p&gt;
&lt;/section&gt;
&lt;section id="system-and-network-administration"&gt;
&lt;h2&gt;System and network administration&lt;/h2&gt;
&lt;p&gt;Very much up on my list for this tasks are two rather unexpected tools, namely, a mail client and a scheduler. In fact, I rely on &lt;a class="reference external" href="http://www.mutt.org/"&gt;mutt&lt;/a&gt; (“All mail clients suck. This one just sucks less.”) for reading the mails sent by &lt;a class="reference external" href="https://github.com/cronie-crond/cronie"&gt;cronie.&lt;/a&gt; Whether I'm interested in the status of my hourly backups on the desktop or in the results of daily security checks on a remote server, this combination of tools is truly indispensable for getting important system messages. In the same category are tools for receiving security news and advisories such as &lt;a class="reference external" href="https://newsboat.org/"&gt;newsboat&lt;/a&gt; with the appropriate feeds (or &lt;a class="reference external" href="https://gitlab.com/ilpianista/arch-audit"&gt;arch-audit&lt;/a&gt; on Arch), and of course the security auditing tool &lt;a class="reference external" href="https://cisofy.com/lynis/"&gt;lynis&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On servers, I often want to know who's logged in on a system and what this user is running. For this task, &lt;a class="reference external" href="https://hisham.hm/htop/"&gt;htop&lt;/a&gt; is the swiss army knife, offering an excellent overview of all system resources and activities and also the possibility to manage them. In particular, htop helps to find (and end) amok running applications consuming too many precious CPU cycles and RAM. Even more information offers &lt;a class="reference external" href="https://github.com/aristocratos/bashtop"&gt;bashtop&lt;/a&gt;, a veritable system monitor for the command line. Applications running wild while accessing the mass storage can be easily identified by &lt;a class="reference external" href="https://wiki.gentoo.org/wiki/Iotop"&gt;iotop&lt;/a&gt;, and disk resources can be checked on a partition level by &lt;a class="reference external" href="https://github.com/garabik/pydf"&gt;pydf&lt;/a&gt; and on a file level by &lt;a class="reference external" href="https://dev.yorhel.nl/ncdu"&gt;ncdu&lt;/a&gt; (or by broot and nnn as mentioned above). For a more in-depth analysis of systems, tools such as &lt;a class="reference external" href="https://github.com/dstat-real/dstat"&gt;dstat&lt;/a&gt; may become helpful, but my general experience has been rather that it either works, or is broken.&lt;/p&gt;
&lt;p&gt;When I have problems with the snappiness of the interwebs (which has become very rare), I first turn to &lt;a class="reference external" href="https://github.com/traviscross/mtr"&gt;mtr&lt;/a&gt; which often helps to find the culprit (although there isn't anything one can do if one of the hops is overloaded and suffers from package loss). Several helpful tools exist if the problem seems to be rather on my side, such as &lt;a class="reference external" href="http://dns.measurement-factory.com/tools/dnstop/"&gt;dnstop&lt;/a&gt;, &lt;a class="reference external" href="https://code.blinkace.com/pdw/iftop"&gt;iftop&lt;/a&gt;, &lt;a class="reference external" href="https://github.com/raboof/nethogs"&gt;nethogs&lt;/a&gt;, &lt;a class="reference external" href="http://iptraf.seul.org/"&gt;iptraf&lt;/a&gt;, and more, but I think that these tools merit a separate post.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="spare-time"&gt;
&lt;h2&gt;Spare time&lt;/h2&gt;
&lt;p&gt;&lt;a class="reference external" href="https://www.youtube.com/watch?v=4lQ_MjU4QHw"&gt;All work and no play makes Cob a dull snake&lt;/a&gt;. I stream videos using &lt;a class="reference external" href="https://mpv.io/"&gt;mpv&lt;/a&gt; and &lt;a class="reference external" href="http://ytdl-org.github.io/youtube-dl/"&gt;youtube-dl&lt;/a&gt;, like everybody else. I used to listen music by &lt;a class="reference external" href="http://moc.daper.net/"&gt;moc&lt;/a&gt;, but I've switched to &lt;a class="reference external" href="https://cmus.github.io/"&gt;cmus&lt;/a&gt; a few year ago. Similarly, I've exchanged &lt;a class="reference external" href="https://irssi.org/"&gt;irssi&lt;/a&gt; for &lt;a class="reference external" href="https://weechat.org/"&gt;weechat&lt;/a&gt; to talk to friends. When I feel like getting some news from the world outside, I fire up &lt;a class="reference external" href="https://newsboat.org/"&gt;newsboat&lt;/a&gt; for a list of feeds that &lt;em&gt;I&lt;/em&gt; find amusing. And for a quick reality check, nothing works better than &lt;a class="reference external" href="https://github.com/mop-tracker/mop"&gt;mop&lt;/a&gt; displaying a ticker of &lt;em&gt;my&lt;/em&gt; stocks. The very compact &lt;a class="reference external" href="https://github.com/pstadler/ticker.sh"&gt;ticker.sh&lt;/a&gt; lured me into creating a permanent ticker on my desktop via &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/weather-widget.html"&gt;conky&lt;/a&gt; integration, but I found that it distracts me way too much.&lt;/p&gt;
&lt;section id="appendix-bulk-rename"&gt;
&lt;h3&gt;Appendix: bulk rename&lt;/h3&gt;
&lt;p&gt;For sake of example, let's create 101 files with &lt;code class="docutils literal"&gt;touch &lt;span class="pre"&gt;rha{0..100}.barber&lt;/span&gt;&lt;/code&gt;, and let's rename them so that the numbers are all three digits (like, 004 instead of 4, 023 instead of 23). We can do that the easy or the hard way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;mc&lt;/strong&gt; gives us the choice, namely, between &lt;a class="reference external" href="https://www.linuxjournal.com/content/globbing-and-regex-so-similar-so-different"&gt;shell patterns (globs) and standard regular expressions (regexes)&lt;/a&gt;. The file selection dialog (press +) has an option 'Using shell patterns'. Let's select that and perform our self-imposed task in three simple steps: first, we select all files with a single digit number (+ rha?.*), then rename them with &lt;code class="docutils literal"&gt;F6&lt;/code&gt; / &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;rha?.*&lt;/span&gt;&lt;/code&gt; / &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;rha0?.*&lt;/span&gt;&lt;/code&gt;, and then all with a two digit number with &lt;code class="docutils literal"&gt;F6&lt;/code&gt; / &lt;code class="docutils literal"&gt;rha &lt;span class="pre"&gt;??.*&lt;/span&gt;&lt;/code&gt; / &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;rha0??.*&lt;/span&gt;&lt;/code&gt; Now, that was easy, wasn't it?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ranger&lt;/strong&gt; doesn't understand globs, but allows the use of regexes with the :filter (zf) and :mark commands. The renaming is sourced out to the system wide editor, i.e., vim in my case, where we can use the substitute command (:s) and vim regexes (which are mostly identical to those used in, for example, sed and perl, but &lt;a class="reference external" href="https://remram44.github.io/regex-cheatsheet/regex.html"&gt;not identical&lt;/a&gt;). So let's start with selecting  all files with a single digit number: &lt;code class="docutils literal"&gt;:mark &lt;span class="pre"&gt;-rft&lt;/span&gt; &lt;span class="pre"&gt;rha[0-9].b&lt;/span&gt;&lt;/code&gt;, followed by &lt;code class="docutils literal"&gt;:bulkrename&lt;/code&gt;. The selected files can be easily renamed in vim by &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;:%s/\([0-9]\)/0\1/g&lt;/span&gt;&lt;/code&gt;, followed by &lt;code class="docutils literal"&gt;ZZ&lt;/code&gt; to save the list and apply it. For the next bunch, we mark files again by &lt;code class="docutils literal"&gt;:mark &lt;span class="pre"&gt;-rft&lt;/span&gt; &lt;span class="pre"&gt;rha[0-9]..b&lt;/span&gt;&lt;/code&gt;, &lt;code class="docutils literal"&gt;:bulkrename&lt;/code&gt;, and repeat the above command in vim. Not quite as easy as with mc if one is not very familiar with regexes!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nnn&lt;/strong&gt; is very similar to ranger in this regard. We can select files by the filter function employing either strings (/) or regexes (\). So we type &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;\rha[0-9].b&lt;/span&gt;&lt;/code&gt; followed by &lt;code class="docutils literal"&gt;r&lt;/code&gt; to open the selected files in vim. The rest is basically the same as for ranger.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;</description><category>desktop</category><category>linux</category><guid>https://cobra.pdes-net.org/posts/working-on-the-command-line.html</guid><pubDate>Mon, 01 Jun 2020 15:00:13 GMT</pubDate></item><item><title>What you don't want to use, revisited</title><link>https://cobra.pdes-net.org/posts/what-you-dont-want-to-use-revisited.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;A decade ago, I advised my readers to &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/presentations-what-you-dont-want-to-use.html"&gt;stay away from OpenOffice&lt;/a&gt; for the preparation of professional presentations, primarily because of the poor support of vector graphics formats at that time. In view of the &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/the-office-suites-disaster.html"&gt;difficulties&lt;/a&gt; we have recently encountered when working with collaborators on the same document with different Office versions, I was now setting great hopes in LibreOffice for the preparation of our next project proposal. &lt;strong&gt;First&lt;/strong&gt; of all, I thought that using platform-independent open source software, it should be straightforward to guarantee that all collaborators are using the same version of the software. &lt;strong&gt;Second&lt;/strong&gt;, the support for SVG has been &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/the-office-suites-disaster.html"&gt;much improved&lt;/a&gt; in recent versions (&amp;gt;6) of LibreOffice, and I believed that we finally should be able to import vector graphics directly from Inkscape into an Office document. &lt;strong&gt;Third&lt;/strong&gt;, the &lt;a class="reference external" href="http://roland65.free.fr/texmaths/"&gt;TexMaths&lt;/a&gt; extension allows one to use LaTeX for typesetting equations and to insert them as SVG, promising a much improved math rendering at a fraction of the time needed to enter it compared to the native equation editor. &lt;strong&gt;Fourth&lt;/strong&gt;, Mendeley offers a &lt;a class="reference external" href="https://www.mendeley.com/reference-management/citation-plugin"&gt;citation plugin&lt;/a&gt; for LibreOffice, which I hoped would make the management of the bibliography and inserting citations as simple as with BibTeX in a LaTeX document.&lt;/p&gt;
&lt;p&gt;Well, all of these hopes were in vain. What we (I) had chosen for preparing the proposal (the latest LibreOffice, TexMaths extension, and Mendeley plugin) proved to be one of the buggiest software combos of all times.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ad (i):&lt;/strong&gt; Not the fault of the software, but still kind of sobering: our external collaborator declared that he had never heard about LibreOffice, and that he wouldn't know how to install it. Well, we thought, now only two people have to stay compatible to each other. We installed the same version of LibreOffice (first Still, than Fresh), I on Linux, he on Windows. But the different operating systems probably had little to do with what followed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ad (ii):&lt;/strong&gt; I was responsible for all display items in the proposal, and I've used a  combination of Mathematica, Python, Gimp, and Inkscape to create the seven figures contained in it. The final SVG, however, was always generated by Inkscape. I've experienced two serious problems with these figures. First, certain line art elements such as arrows were simply not shown in LibreOffice or in PDFs created by it. Second, the figures tended to “disappear”: when trying to move one of them, another would suddenly be invisible. The caption numbering showed that they were still part of the document, and simply inserting them again messed up the numbering. We've managed to find one of these hidden figures in the nowhere between two pages (like being trapped between dimensions 😱), but others stayed mysteriously hidden. We had to go back to the previous version to resolve these issues, and in the end I converted all figures to bitmaps. D'Oh!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ad (iii):&lt;/strong&gt; I wrote a large part of my text in one session and inserted all symbols and equations using TeXMaths. Worked perfectly, and after saving the document, I went home, quite satisfied with my achievements this day. When I tried to continue the next day, LibreOffice told me the document is corrupted, and was subsequently unable to open it. I finally managed to open it with TextMaker, which didn't complain, but also didn't show any of the equations I had inserted the day before. Well, I saved the document anyway to at least restore the text. Opening the file saved by TextMaker with Writer worked, and even all symbols and equations showed up as SVG graphics, but without the possibility to edit them by TeXMaths.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ad (iv):&lt;/strong&gt; Since my colleague had previously used the Mendeley plugin for Word, it was him who had the task to insert our various references (initially about 40). That seemed to work very well, although he found the plugin irritatingly slow (40 references take something like a minute to process). However, when he tried to enter additional references a few days later, Mendeley claimed that the previous one were edited manually, displayed a dialogue asking whether we would like to keep this manual edit or disregard it. Regardless the choice, the previous citations were now generated twice. And with any further citation, twice more, so that after adding three more citations, [1] became [1][1][1][1][1][1][1][1]. The plugin also took proportionally longer for processing the file, so in the last example, it took about 10 min. Well, we went one version back. But what worked so nicely the day before was now inexplicably broken. It turned out that a simple sync of Mendeley (which is carried out automatically when you start this software) can be sufficient for triggering this behavior. We finally inserted the last references manually, overriding and actually irreversibly damaging the links between the citations and the bibliography.&lt;/p&gt;
&lt;p&gt;In the final stages, working on the proposal felt like skating on atomically thin ice (&lt;a class="reference external" href="https://onlinelibrary.wiley.com/doi/abs/10.1002/smll.201402041"&gt;Icen&lt;/a&gt; 😎). We always expected the worst, and instead of concentrating on the content, we treated the document like a piece of prehistoric art which could be damaged by anything, including just viewing the document on the screen. That feeling was very distracting. I would have loved to correct my position, really, but LibreOffice in its present state is clearly no alternative to LaTeX for preparing the documents and presentations required in my professional environment. I will check again in another ten years.  😉&lt;/p&gt;
&lt;p&gt;In principle, I would have no problem with being solely responsible for the document if I could use LaTeX and would get the contribution from the collaborators simply as plain text. It is them having a problem with that, since they don't know what plain text is. In this context, I increasingly understand the trend to collaborative software: it's not that people really work at the same time, simultaneously, on a document, but it's the fact that people work on it with the guaranteed same software which counts.&lt;/p&gt;</description><category>desktop</category><category>linux</category><category>presentations</category><category>windows</category><guid>https://cobra.pdes-net.org/posts/what-you-dont-want-to-use-revisited.html</guid><pubDate>Sat, 01 Jun 2019 16:58:12 GMT</pubDate></item><item><title>Modern file compression</title><link>https://cobra.pdes-net.org/posts/modern-file-compression.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;Unknown to most users, file compression silently works behind the scene. Updates for any operating system, for example, are compressed. That happens automatically and the user doesn't even need to know about it.&lt;/p&gt;
&lt;p&gt;But sometimes, we have a choice. In Archlinux, for example, we can set the compression we'd like to use for packages created by makepkg (such as those installed over the AUR) – but how to chose between gz, bz2, xz, lrz, lzo, and z? And some backup software adds further options: &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/a-simple-automated-backup-scheme.html"&gt;Borg&lt;/a&gt;, for example, offers zlib, lzma, lz4, and zstd.&lt;/p&gt;
&lt;p&gt;Most surprisingly, some of these algorithms have been developed only very recently: &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Zstandard"&gt;zstd&lt;/a&gt; comes from Facebook (2016), and there's &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Brotli"&gt;brotli&lt;/a&gt; from Google (2015) and &lt;a class="reference external" href="https://en.wikipedia.org/wiki/LZFSE"&gt;lzfse&lt;/a&gt; from Apple (2015). Why do these multi-billion-dollar companies develop compression algorithms? Because of the &lt;a class="reference external" href="https://www.xda-developers.com/google-brotli-compression-faster-ota-updates/"&gt;multi-billion dollars&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Instead of testing each of these algorithms &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/pack-as-pack-can.html"&gt;yourself&lt;/a&gt;, you can use &lt;a class="reference external" href="https://github.com/inikep/lzbench"&gt;lzbench&lt;/a&gt;. It tests all open source algorithms of the lz family with the &lt;em&gt;de facto&lt;/em&gt; standard file package in the compression business, the &lt;a class="reference external" href="http://mattmahoney.net/dc/silesia.html"&gt;silesia suite&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here are three examples geared toward high compression ratio, high speed compression, and high speed decompression:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;High compression ratio (&amp;lt;25%)&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;➜  lzbench -c -ebrotli,11/xz,6,9/zstd,22 silesia.tar
lzbench 1.7.3 (64-bit Linux)   Assembled by P.Skibinski
Compressor name         Compress. Decompress. Compr. size  Ratio
memcpy                   9814 MB/s  9852 MB/s   211947520 100.00
brotli 2017-12-12 -11    0.48 MB/s   385 MB/s    51136654  24.13
xz 5.2.3 -6              2.30 MB/s    74 MB/s    48745306  23.00
zstd 1.3.3 -22           2.30 MB/s   600 MB/s    52845025  24.93&lt;/pre&gt;
&lt;p&gt;These are single core values. xz compression (but not decompression) profits from multithreading, while brotli and zstd do not.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;High speed compression (for compression ratios &amp;lt;50%)&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;➜  lzbench -c -elz4/lzo1x silesia.tar
Compressor name         Compress. Decompress. Compr. size  Ratio
memcpy                   9861 MB/s  9768 MB/s   211947520 100.00
lz4 1.8.0                 524 MB/s  2403 MB/s   100880800  47.60
lzo1x 2.09 -12            521 MB/s   738 MB/s   103238859  48.71&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;High speed decompression (&amp;gt; 2000 MB/s)&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;↪ lzbench -c -elz4/lizard,10/lzsse8,6 silesia.tar
Compressor name         Compress. Decompress. Compr. size  Ratio
memcpy                   9579 MB/s 10185 MB/s   211947520 100.00
lz4 1.8.0                 525 MB/s  2421 MB/s   100880800  47.60
lizard 1.0 -10            421 MB/s  2115 MB/s   103402971  48.79
lzsse8 2016-05-14 -6     8.25 MB/s  3359 MB/s    75469717  35.61&lt;/pre&gt;
&lt;p&gt;What do we learn from these benchmarks?&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;If we want high compression reasonably fast, nothing beats xz. It's just perfect for what it's actually used by some (all?) Linux distributions: to distribute updates with acceptable computational resources over a channel with a very limited band width.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the distributor commands over virtually unlimited resources, and compression speed is thus not an issue, brotli and zstd are clearly superior to all other choices. That's how we would like to have our updates: small and fast to decompress.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If size is not of primary importance, but compression speed is, lz4 and lzo are the champions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If decompression speed is essential, &lt;a class="reference external" href="https://github.com/ConorStokes/LZSSE"&gt;lzsse8&lt;/a&gt; wins. This is a lesser known member of the lz family and not widely available, in contrast to lz4 which thus scores again.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>desktop</category><category>hardware</category><category>linux</category><guid>https://cobra.pdes-net.org/posts/modern-file-compression.html</guid><pubDate>Sun, 10 Feb 2019 13:17:49 GMT</pubDate></item><item><title>Weather widget</title><link>https://cobra.pdes-net.org/posts/weather-widget.html</link><dc:creator>Cobra</dc:creator><description>&lt;p&gt;To my great dismay, Yahoo &lt;a class="reference external" href="https://developer.yahoo.com/weather/"&gt;announced&lt;/a&gt; earlier this year that their weather API will retire at January 3rd. And indeed, my &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/conkys-resurrection.html"&gt;little weather conky&lt;/a&gt; ceased to work at this day and thus reached its EOL. 😞&lt;/p&gt;
&lt;p&gt;That's really too bad. Common forecast sites are peppered with dozens of javascripts and take ages to open on my Mini or my Lifebook. Here's &lt;a class="reference external" href="https://www.wunderground.com/forecast/de/berlin/IBERLIN1658?cm_ven=localwx_10day"&gt;an example&lt;/a&gt; which I find disagreeably slow even on my desktop. Besides, I also liked my weather conky for its &lt;a class="reference external" href="https://cobra.pdes-net.org/posts/weather.html"&gt;aesthetic merit&lt;/a&gt; – at least _I_ found it pleasing to look at.&lt;/p&gt;
&lt;p&gt;Well well well. There’s no point in crying over spilled milk. What are the options? There's &lt;a class="reference external" href="https://bitbucket.org/plikhari/conkywx_pub/wiki/Home"&gt;conkywx,&lt;/a&gt; of course, the script collection for true weather aficionados. I  look at it every second year and always feel that it's a tad overwhelming, at least  for me, both with regard to features and visuals (&lt;a class="reference external" href="http://users.gilanet.com/~tfrost/brrr-12-16-15"&gt;one&lt;/a&gt;, &lt;a class="reference external" href="https://imgur.com/OE2lSUR"&gt;two&lt;/a&gt;, &lt;a class="reference external" href="https://browse.startpage.com/do/show_picture.pl?l=english&amp;amp;rais=1&amp;amp;oiu=http%3A%2F%2Fi67.tinypic.com%2Fbdv19s.png&amp;amp;sp=432e1c38d274c717c0c885f317b0dd9f&amp;amp;t=default"&gt;three&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Alternatively, I could rebuild my weather conky around a new API – perhaps even the new Yahoo API. But I don't like to register anywhere for a simple weather forecast (and certainly not at Yahoo), and also don't want to spent more than, say, 15 min in getting a new forecast.&lt;/p&gt;
&lt;p&gt;And then I found &lt;a class="reference external" href="http://wttr.in"&gt;wttr.in&lt;/a&gt; – the fastest weather forecast ever. It's accessible by browser or in the terminal as a curl-based service, can be configured on the fly, and its ASCII graphs breath nerdy charm.&lt;/p&gt;
&lt;p&gt;It's a one-liner in conky:&lt;/p&gt;
&lt;pre class="literal-block"&gt;${execpi 3600 curl -s "wttr.in/Berlin?nT&amp;amp;lang=de" | head -n -2}&lt;/pre&gt;
&lt;p&gt;for a narrow (?n) and black-and-white (?T) view and&lt;/p&gt;
&lt;pre class="literal-block"&gt;${execpi 3600 curl -s "wttr.in/Berlin?n&amp;amp;lang=de" | ~/.config/conky/ansito | head -n -2}&lt;/pre&gt;
&lt;p&gt;in full color thanks to &lt;a class="reference external" href="https://github.com/pawamoy/ansito"&gt;ansito,&lt;/a&gt; which translates the ANSI color codes to the corresponding ones on conky.&lt;/p&gt;
&lt;p&gt;But do we actually need a desktop widget when the forecast is so readily accessible? One could simple have an extra tab open in a browser, for example. Or, one could have a tab reserved for wttr.in in a &lt;a class="reference external" href="http://guake-project.org/"&gt;Guake&lt;/a&gt; style terminal. For convenience, one could define an alias (works for all major shells) that updates the weather forecast every hour:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code bash"&gt;&lt;a id="rest_code_84b3b43023304c3992b55c30d18a1578-1" name="rest_code_84b3b43023304c3992b55c30d18a1578-1" href="https://cobra.pdes-net.org/posts/weather-widget.html#rest_code_84b3b43023304c3992b55c30d18a1578-1"&gt;&lt;/a&gt;&lt;span class="nb"&gt;alias&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;wttr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'watch -ct -n 3600 "curl -s wttr.in/Berlin?lang=de | head -n -2"'&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Hey, I like that. 😊&lt;/p&gt;</description><category>desktop</category><guid>https://cobra.pdes-net.org/posts/weather-widget.html</guid><pubDate>Sun, 27 Jan 2019 14:56:42 GMT</pubDate></item></channel></rss>