<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>I3 on Major Hayden</title><link>https://major.io/tags/i3/</link><description>Recent content in I3 on Major Hayden</description><generator>Hugo</generator><language>en</language><managingEditor>major@mhtx.net (Major Hayden)</managingEditor><webMaster>major@mhtx.net (Major Hayden)</webMaster><copyright>All content licensed &lt;a href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;CC BY-SA 4.0&lt;/a&gt;</copyright><lastBuildDate>Mon, 09 Nov 2026 20:39:15 -0600</lastBuildDate><atom:link href="https://major.io/tags/i3/index.xml" rel="self" type="application/rss+xml"/><item><title>Viewing Xorg logs with journalctl in Fedora</title><link>https://major.io/p/xorg-logs-fedora-journalctl/</link><pubDate>Sun, 16 Feb 2025 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/xorg-logs-fedora-journalctl/</guid><description>&lt;p&gt;I love being an early adopter and trudging off into the unknown.&#10;After all, that&amp;rsquo;s one of the best ways to learn new things and you end up improving the experience for everyone who comes behind you.&#10;However, things can get a little frustrating from time to time especially when your daily work dictates that your desktop works really well. 😉&lt;/p&gt;&#10;&lt;p&gt;Sway has been my desktop of choice for a few years and although it seems to work well, I ran into lots of issues with Wayland.&#10;It was easy to plot a course around most of these problems, but not all of them.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;ve recently run back to safety with my old, trusty, i3 window manager in Xorg.&#10;Then I realized a few of my Xorg configuration weren&amp;rsquo;t taking effect and I couldn&amp;rsquo;t figure out how to isolate the Xorg logs in the system journal to narrow down the problem.&lt;/p&gt;&#10;&lt;p&gt;Skip to the end if you&amp;rsquo;re short on time or peruse the next section if you haven&amp;rsquo;t been deep in the innards of your system journal in a while. 🔍&lt;/p&gt;&#10;&lt;h2 id="journal-metadata"&gt;Journal metadata&lt;/h2&gt;&#10;&lt;p&gt;Every journal entry in journald has metadata attached to it which you can use to filter the logs.&#10;Most people know about filtering based on systemd services, like this:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; journalctl --boot --unit chronyd.service | head&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemd[1]: Starting chronyd.service - NTP client/server...&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chronyd[2662]: chronyd version 4.6.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 +DEBUG)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chronyd[2662]: Using leap second list /usr/share/zoneinfo/leap-seconds.list&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chronyd[2662]: Frequency -3.595 +/- 6.086 ppm read from /var/lib/chrony/drift&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chronyd[2662]: Loaded seccomp filter (level 2)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemd[1]: Started chronyd.service - NTP client/server.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chronyd[2662]: Added source 192.168.10.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chronyd[2662]: Selected source 208.67.72.50 (2.fedora.pool.ntp.org)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chronyd[2662]: System clock TAI offset set to 37 seconds&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chronyd[2662]: Selected source 173.73.96.68 (2.fedora.pool.ntp.org)&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This command shows all of the messages from the &lt;code&gt;chronyd&lt;/code&gt; service since the last boot.&#10;However, we can get much more specific with our filtering using other criteria.&lt;/p&gt;&#10;&lt;h2 id="examining-metadata"&gt;Examining metadata&lt;/h2&gt;&#10;&lt;p&gt;You can examine the metadata behind each log line with the json output in journalctl:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; journalctl --boot --unit chronyd.service -o json -n 1 | jq&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_CMDLINE&amp;#34;: &amp;#34;/usr/sbin/chronyd -F 2&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_CGROUP&amp;#34;: &amp;#34;/system.slice/chronyd.service&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_MACHINE_ID&amp;#34;: &amp;#34;xxxxx&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_UID&amp;#34;: &amp;#34;990&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;SYSLOG_TIMESTAMP&amp;#34;: &amp;#34;Feb 16 13:55:59 &amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__SEQNUM_ID&amp;#34;: &amp;#34;c94633ee6da2480ca4602ca6ab47f82a&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_PID&amp;#34;: &amp;#34;2662&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;PRIORITY&amp;#34;: &amp;#34;6&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_HOSTNAME&amp;#34;: &amp;#34;zorro&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_SLICE&amp;#34;: &amp;#34;system.slice&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;SYSLOG_FACILITY&amp;#34;: &amp;#34;3&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_GID&amp;#34;: &amp;#34;989&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_INVOCATION_ID&amp;#34;: &amp;#34;156fce8836374564b01aeb6628160ccb&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__CURSOR&amp;#34;: &amp;#34;s=c94633ee6da2480ca4602ca6ab47f82a;i=19fb3a;b=ed9e1fccb1744136a3d726bbf2425388;m=33abfdf67;t=62e47cbf2b72f;x=f9a8d4e3bc4fef30&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__MONOTONIC_TIMESTAMP&amp;#34;: &amp;#34;13870554983&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SOURCE_REALTIME_TIMESTAMP&amp;#34;: &amp;#34;1739735759501027&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_TRANSPORT&amp;#34;: &amp;#34;syslog&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_EXE&amp;#34;: &amp;#34;/usr/sbin/chronyd&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_UNIT&amp;#34;: &amp;#34;chronyd.service&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;SYSLOG_IDENTIFIER&amp;#34;: &amp;#34;chronyd&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_BOOT_ID&amp;#34;: &amp;#34;ed9e1fccb1744136a3d726bbf2425388&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__REALTIME_TIMESTAMP&amp;#34;: &amp;#34;1739735759501103&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__SEQNUM&amp;#34;: &amp;#34;1702714&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_RUNTIME_SCOPE&amp;#34;: &amp;#34;system&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;SYSLOG_PID&amp;#34;: &amp;#34;2662&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_CAP_EFFECTIVE&amp;#34;: &amp;#34;2000400&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;MESSAGE&amp;#34;: &amp;#34;Selected source 173.73.96.68 (2.fedora.pool.ntp.org)&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_COMM&amp;#34;: &amp;#34;chronyd&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SELINUX_CONTEXT&amp;#34;: &amp;#34;system_u:system_r:chronyd_t:s0&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The most helpful one for us is &lt;code&gt;_COMM_&lt;/code&gt;.&#10;We can use it to limit our search solely to Xorg logs.&lt;/p&gt;&#10;&lt;p&gt;Every Xorg startup has a line with the Xorg version that looks like this:&#10;&lt;code&gt;X.Org X Server 1.21.1.15&lt;/code&gt;.&#10;Let&amp;rsquo;s search for that:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; journalctl --boot -o json | grep -i &amp;#34;x.org x server&amp;#34; | jq&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_HOSTNAME&amp;#34;: &amp;#34;zorro&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_BOOT_ID&amp;#34;: &amp;#34;ed9e1fccb1744136a3d726bbf2425388&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_INVOCATION_ID&amp;#34;: &amp;#34;5cf933063b1246909d4ea15e7154bff4&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_MACHINE_ID&amp;#34;: &amp;#34;xxxxx&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__CURSOR&amp;#34;: &amp;#34;s=c94633ee6da2480ca4602ca6ab47f82a;i=19de06;b=ed9e1fccb1744136a3d726bbf2425388;m=4597347;t=62e2f4fcc855d;x=b4f482006e1523ff&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__MONOTONIC_TIMESTAMP&amp;#34;: &amp;#34;72971079&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_SESSION&amp;#34;: &amp;#34;2&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_SLICE&amp;#34;: &amp;#34;user-1000.slice&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SELINUX_CONTEXT&amp;#34;: &amp;#34;system_u:system_r:xdm_t:s0-s0:c0.c1023&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__SEQNUM_ID&amp;#34;: &amp;#34;c94633ee6da2480ca4602ca6ab47f82a&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_AUDIT_LOGINUID&amp;#34;: &amp;#34;1000&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__REALTIME_TIMESTAMP&amp;#34;: &amp;#34;1739630597408093&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_CMDLINE&amp;#34;: &amp;#34;/usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_AUDIT_SESSION&amp;#34;: &amp;#34;2&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_USER_SLICE&amp;#34;: &amp;#34;-.slice&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;__SEQNUM&amp;#34;: &amp;#34;1695238&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_GID&amp;#34;: &amp;#34;1000&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_RUNTIME_SCOPE&amp;#34;: &amp;#34;system&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;SYSLOG_IDENTIFIER&amp;#34;: &amp;#34;/usr/libexec/gdm-x-session&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;MESSAGE&amp;#34;: &amp;#34;X.Org X Server 1.21.1.15&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_STREAM_ID&amp;#34;: &amp;#34;7f35e3ce14d44dc8b589be76d4d355d9&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_TRANSPORT&amp;#34;: &amp;#34;stdout&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_CAP_EFFECTIVE&amp;#34;: &amp;#34;0&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_UNIT&amp;#34;: &amp;#34;session-2.scope&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_UID&amp;#34;: &amp;#34;1000&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_EXE&amp;#34;: &amp;#34;/usr/libexec/Xorg&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;PRIORITY&amp;#34;: &amp;#34;4&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_COMM&amp;#34;: &amp;#34;Xorg&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_CGROUP&amp;#34;: &amp;#34;/user.slice/user-1000.slice/session-2.scope&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_SYSTEMD_OWNER_UID&amp;#34;: &amp;#34;1000&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &amp;#34;_PID&amp;#34;: &amp;#34;3929&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that the value for &lt;code&gt;_COMM&lt;/code&gt; is &lt;code&gt;Xorg&lt;/code&gt;.&#10;We can use that to search our logs with ease using the &lt;code&gt;cat&lt;/code&gt; output from journalctl, which makes the output as terse as possible.&#10;It removes all the headers and make it look like you&amp;rsquo;re reading a plain old text log file:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; journalctl --output cat --boot _COMM=Xorg | head&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(--) Log file renamed from &amp;#34;/home/major/.local/share/xorg/Xorg.pid-3929.log&amp;#34; to &amp;#34;/home/major/.local/share/xorg/Xorg.0.log&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;X.Org X Server 1.21.1.15&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;X Protocol Version 11, Revision 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Current Operating System: Linux zorro 6.12.13-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Feb 8 20:05:26 UTC 2025 x86_64&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Kernel command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.12.13-200.fc41.x86_64 root=UUID=bae22798-ce48-43e9-ac24-7bf7f7158e90 ro rootflags=subvol=root rd.luks.uuid=luks-defea11e-374c-48ab-83df-4f06c4c02186 rhgb quiet&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Build ID: xorg-x11-server 21.1.15-1.fc41&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Current version of pixman: 0.44.2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;Before reporting problems, check http://wiki.x.org&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;to make sure that you have the latest version.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Markers: (--) probed, (**) from config file, (==) default setting,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In my particular case, I was missing the amdgpu driver for Xorg.&#10;I installed the &lt;code&gt;xorg-x11-drv-amdgpu&lt;/code&gt; package, rebooted, and now my logs showed the driver being loaded on startup:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; journalctl --output cat --boot _COMM=Xorg | grep -i amdgpu | head&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(II) Applying OutputClass &amp;#34;AMDgpu&amp;#34; to /dev/dri/card1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;loading driver: amdgpu&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(==) Matched amdgpu as autoconfigured driver 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(II) LoadModule: &amp;#34;amdgpu&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(II) Loading /usr/lib64/xorg/modules/drivers/amdgpu_drv.so&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(II) Module amdgpu: vendor=&amp;#34;X.Org Foundation&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(II) AMDGPU: Driver for AMD Radeon:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;All GPUs supported by the amdgpu kernel driver&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(II) AMDGPU(0): Creating default Display subsection in Screen section&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;(==) AMDGPU(0): Depth 24, (--) framebuffer bpp 32&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="further-reading"&gt;Further reading&lt;/h2&gt;&#10;&lt;p&gt;There are &lt;em&gt;tons&lt;/em&gt; of ways to filter journald logs and one of the best resources for learning about all of them is the &lt;a href="https://www.freedesktop.org/software/systemd/man/latest/journalctl.html"&gt;journalctl man page&lt;/a&gt;.&#10;There&amp;rsquo;s also a &lt;a href="https://gist.github.com/sergeyklay/f401dbc8286f732783e05072f03ecb61"&gt;helpful journalctl cheat sheet&lt;/a&gt; on GitHub.&lt;/p&gt;&#10;</description></item><item><title>Connect 1Password's CLI and app in i3 with lxpolkit</title><link>https://major.io/p/1password-cli-lxpolkit/</link><pubDate>Fri, 30 Dec 2022 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/1password-cli-lxpolkit/</guid><description>&lt;p&gt;&lt;a href="https://bitwarden.com/"&gt;Bitwarden&lt;/a&gt; became my go-to password manager a few years ago after I finally abandoned LastPass.&#10;Once I read the recent news about &lt;a href="https://www.theverge.com/2022/12/28/23529547/lastpass-vault-breach-disclosure-encryption-cybersecurity-rebuttal"&gt;stolen password vaults&lt;/a&gt;, I was even happier that I made the switch.&lt;/p&gt;&#10;&lt;p&gt;My original password manager from way back in my Apple days was &lt;a href="https://1password.com/"&gt;1Password&lt;/a&gt;.&#10;It had a great user interface on the Mac and on iPhones, but I found it frustrating to use when I switched to Linux laptops and Android phones.&lt;/p&gt;&#10;&lt;p&gt;Lots of people in my Mastodon timeline were singing the praises of 1Password&amp;rsquo;s security and user interface after the recent LastPass news, so I decided to give it another look.&#10;It has a great CLI now and the GUI application runs well in Linux.&#10;The CLI also connects to the application via &lt;a href="https://policykit.org/"&gt;PolicyKit&lt;/a&gt; and it has some helpful plugins for various other CLI tools, like the AWS cli.&lt;/p&gt;&#10;&lt;p&gt;I decided to give 1Password another try, but then I ran into a problem with the CLI. 🤔&lt;/p&gt;&#10;&lt;p&gt;🏃 In a hurry? &lt;a href="#the-fix"&gt;Go straight to the fix.&lt;/a&gt;&lt;/p&gt;&#10;&lt;h1 id="authentication-problems"&gt;Authentication problems&lt;/h1&gt;&#10;&lt;p&gt;The 1Password application was up and running and I followed the &lt;a href="https://support.1password.com/system-authentication-linux/"&gt;documented steps&lt;/a&gt; for enabling Linux authentication for the CLI.&#10;However, I still couldn&amp;rsquo;t authenticate:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; op item list --vault Private&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;[ERROR] 2022/12/31 11:26:54 authorization prompt dismissed, please try again&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The 1Password documentation says that the application will automatically write a polkit action file at &lt;code&gt;/usr/share/polkit-1/actions/com.1password.1Password.policy&lt;/code&gt; to handle the authentication and that file was present:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; ls -al /usr/share/polkit-1/actions/com.1password.1Password.policy&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;-rw-r--r--. 1 root root 1508 Dec 29 09:48 /usr/share/polkit-1/actions/com.1password.1Password.policy&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In addition, the PolicyKit daemon is running:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; ps aufx &lt;span class="p"&gt;|&lt;/span&gt; grep polkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;polkitd 1293 0.0 0.0 2692700 26736 ? Ssl 10:47 0:00 /usr/lib/polkit-1/polkitd --no-debug&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; rpm -qf /usr/lib/polkit-1/polkitd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;polkit-121-4.fc37.x86_64&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id="putting-it-together"&gt;Putting it together&lt;/h1&gt;&#10;&lt;p&gt;Then I stopped to think about what the system was telling me:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;1Password&amp;rsquo;s CLI says that the authentication prompt is being dismissed&lt;/li&gt;&#10;&lt;li&gt;I never saw an authentication prompt&lt;/li&gt;&#10;&lt;li&gt;The PolicyKit daemon is running properly without errors&lt;/li&gt;&#10;&lt;li&gt;Running &lt;code&gt;strace&lt;/code&gt; on &lt;code&gt;polkitd&lt;/code&gt; and &lt;code&gt;op&lt;/code&gt; showed everything looking good&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;But wait, the policykit daemon is only half of what I needed.&#10;There needs to be some type of window manager integration to pop up an authentication prompt and I wasn&amp;rsquo;t seeing that prompt.&lt;/p&gt;&#10;&lt;p&gt;On i3, I use &lt;code&gt;lxpolkit&lt;/code&gt; for policykit integration and it should have popped up some kind of prompt for me.&#10;&lt;code&gt;lxpolkit&lt;/code&gt; is installed:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; rpm -q lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;lxpolkit-0.5.5-8.D20210419git82580e45.fc37.x86_64&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then I noticed something strange.&#10;The actual &lt;code&gt;lxpolkit&lt;/code&gt; daemon that handles the authentication prompts was not running even though it was configured to automatically start as soon as I logged in:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; rpm -ql lxpolkit &lt;span class="p"&gt;|&lt;/span&gt; grep autostart&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;/etc/xdg/autostart/lxpolkit.desktop&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; pgrep lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;#&lt;/span&gt; Nothing here&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My default i3 configuration starts all of these automatically with &lt;code&gt;dex-autostart&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; grep dex ~/.config/i3/config&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;exec --no-startup-id dex-autostart --autostart --environment i3&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then I saw the issue at the very end of the &lt;code&gt;lxpolkit&lt;/code&gt; desktop file:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; tail /etc/xdg/autostart/lxpolkit.desktop&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Comment[tr]=Policykit Kimlik Doğrulama Aracı&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Comment[uk]=Агент авторизації Policykit&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Comment[zh_CN]=Policykit 认证代理&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Comment[zh_TW]=Policykit 身分核對代理程式&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Exec=lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;TryExec=lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Icon=gtk-dialog-authentication&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Hidden=true&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;X-Desktop-File-Install-Version=0.26&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;OnlyShowIn=LXDE;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;OnlyShowIn=LXDE&lt;/code&gt; means that &lt;code&gt;dex-autostart&lt;/code&gt; will skip it when the environment is set to &lt;code&gt;i3&lt;/code&gt;!🤦‍♂️&lt;/p&gt;&#10;&lt;h1 id="the-fix"&gt;The fix&lt;/h1&gt;&#10;&lt;p&gt;I copied the desktop file into my local autostart directory and removed the last line:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; cp /etc/xdg/autostart/lxpolkit.desktop ~/.config/autostart/&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; tail -n &lt;span class="m"&gt;5&lt;/span&gt; ~/.config/autostart/lxpolkit.desktop&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Exec=lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;TryExec=lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Icon=gtk-dialog-authentication&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Hidden=true&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;X-Desktop-File-Install-Version=0.26&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then I ran &lt;code&gt;dex-autostart&lt;/code&gt; manually to ensure it worked:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;#&lt;/span&gt; dex-autostart --autostart --environment i3 --verbose&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Autostart file: /home/major/.config/autostart/lxpolkit.desktop&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Executing command: lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Success!&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; ps aufx &lt;span class="p"&gt;|&lt;/span&gt;grep lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;major 20432 0.0 0.0 393124 12304 pts/3 Sl 11:54 0:00 lxpolkit&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I tried the 1Password command line application one more time&amp;hellip;&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="auth-prompt.png" alt="1Password auth prompt via policykit"&gt;&lt;/p&gt;&#10;&lt;p&gt;It worked!&#10;As long as the 1Password application is running and unlocked, I can use the &lt;code&gt;op&lt;/code&gt; CLI tool with my normal Linux system authentication.&lt;/p&gt;&#10;</description></item><item><title>Make your mark with the compose key</title><link>https://major.io/p/compose-key/</link><pubDate>Mon, 12 Dec 2022 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/compose-key/</guid><description>&lt;p&gt;Much of my work is driven by my keyboard, and I love finding new ways to do complicated actions in a hurry.&#10;That&amp;rsquo;s why I&amp;rsquo;m drawn towards tiling window managers like &lt;a href="https://i3wm.org/"&gt;i3&lt;/a&gt; and &lt;a href="https://swaywm.org/"&gt;sway&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;My team at work spans the globe and speaks many different languages.&#10;Many of these languages have diacritics (such as accents, tildes, or other marks) that completely change the pronunciation &lt;em&gt;(or even the meaning!)&lt;/em&gt; of the word.&#10;Sure, I can type Tomas (TOM-oss) quickly, but it&amp;rsquo;s not the same as Tomaš (TOM-osh).&lt;/p&gt;&#10;&lt;p&gt;Using diacritics shows respect for someone&amp;rsquo;s name, their language and their culture.&#10;In some situations, it can be the difference between something totally normal and potentially offensive&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;&#10;&lt;h1 id="the-old-way"&gt;The old way&lt;/h1&gt;&#10;&lt;p&gt;I wrote about this &lt;a href="https://major.io/2020/02/13/make-diacritics-easy-in-linux/"&gt;way back in 2020&lt;/a&gt; but my main method for getting this done was using the &lt;a href="https://en.wikipedia.org/wiki/AltGr_key"&gt;AltGr key&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;If you want to type niños (children) in Spanish, you do this:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Hold down the right Alt key&lt;/li&gt;&#10;&lt;li&gt;Hold down the Shift key&lt;/li&gt;&#10;&lt;li&gt;Press the ~ key&lt;/li&gt;&#10;&lt;li&gt;Press n&lt;/li&gt;&#10;&lt;li&gt;Let go of everything and admire your ñ 😍&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This felt so slick and I was off to the races typing all kinds of accents and other marks.&#10;I wrote the blog post, tweeted about it, and waited for others to reply with the same excitement.&lt;/p&gt;&#10;&lt;p&gt;The first reply from a European was:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Nice work, but what&amp;rsquo;s wrong with the compose key?&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;What&amp;rsquo;s a compose key? 🤔&lt;/p&gt;&#10;&lt;h1 id="compose-key"&gt;Compose key&lt;/h1&gt;&#10;&lt;p&gt;I stared at my keyboard.&#10;&lt;strong&gt;Where is this mysterious key?&lt;/strong&gt;&#10;I&amp;rsquo;ve never seen it before!&lt;/p&gt;&#10;&lt;p&gt;Wikipedia &lt;a href="https://en.wikipedia.org/wiki/Compose_key"&gt;held the answer&lt;/a&gt;:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Because Microsoft Windows and macOS do not support a compose key by default, the key does not exist on most keyboards designed for modern PC hardware.&#10;When software supports compose key behaviour, some other key is used.&#10;Common examples are the right-hand Windows key, the AltGr key, or one of the Ctrl keys.&#10;There is no LED or other indicator that a compose sequence is ongoing.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;I get to choose the key that becomes the compose key!&#10;After asking a few Europeans about what they use on a US keyboard layout, they suggested the right CTRL key.&lt;/p&gt;&#10;&lt;p&gt;My previous blog post had an i3 configuration line like this:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;exec_always --no-startup-id &amp;#34;setxkbmap us -variant altgr-intl&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I figured there would need to be some kind of argument to pass to set the compose key.&#10;The man page for &lt;code&gt;setxkbmap&lt;/code&gt; says that all of the keyboard sources are in &lt;code&gt;/usr/share/X11/xkb/rules&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt; $ grep compose /usr/share/X11/xkb/rules/base.xml&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;mod_led:compose&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:ralt&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:lwin&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:lwin-altgr&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:rwin&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:rwin-altgr&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:menu&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:menu-altgr&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:lctrl&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:lctrl-altgr&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:rctrl&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:rctrl-altgr&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:caps&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:caps-altgr&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:102&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:102-altgr&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:paus&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:prsc&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; &amp;lt;name&amp;gt;compose:sclk&amp;lt;/name&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Opening that file shows the specific &lt;code&gt;rctrl&lt;/code&gt; option:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;configItem&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;Compose key&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;description&amp;gt;&lt;/span&gt;Position of Compose key&lt;span class="nt"&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/configItem&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;lt;!--- SNIP ---&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;option&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;configItem&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;compose:rctrl&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;description&amp;gt;&lt;/span&gt;Right Ctrl&lt;span class="nt"&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/configItem&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My new i3 line looks like this:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;exec_always --no-startup-id &amp;#34;setxkbmap us -variant altgr-intl -option compose:rctrl&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now I get the best of both worlds:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;I can still use the Alt+Gr key for muscle memory.&lt;/li&gt;&#10;&lt;li&gt;The compose key gives me access to more characters with less keypresses!&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;There&amp;rsquo;s a &lt;a href="https://fsymbols.com/keyboard/linux/compose/"&gt;long list&lt;/a&gt; of symbols you can type with your compose key!&lt;/p&gt;&#10;&lt;div class="footnotes" role="doc-endnotes"&gt;&#10;&lt;hr&gt;&#10;&lt;ol&gt;&#10;&lt;li id="fn:1"&gt;&#10;&lt;p&gt;Just check out &lt;a href="https://www.spanishdict.com/compare/ano/a%C3%B1o"&gt;años versus anos&lt;/a&gt; in Español. 😉 🥔&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>Configure multimedia keys on a Ducky One keyboard</title><link>https://major.io/p/ducky-keyboard-multimedia-keys/</link><pubDate>Mon, 05 Dec 2022 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/ducky-keyboard-multimedia-keys/</guid><description>&lt;p&gt;My Ducky One 2 keyboard arrived around two years ago and I love it.&#10;I type more accurately and that clackety sound gives me that old computer feeling.&#10;&lt;em&gt;(I went with Cherry MX Blue switches.)&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;Although it proviees some basic controls for media, such as muting and adjusting volume, there are no buttons for pausing music or switching to different tracks.&#10;That function exists, but it takes some configuration to work.&lt;/p&gt;&#10;&lt;h2 id="handling-media-keys"&gt;Handling media keys&lt;/h2&gt;&#10;&lt;p&gt;For those of you running a large desktop environment like GNOME or KDE, you likely have built-in multimedia key handling in the environment.&#10;However, I use sway and i3 and there&amp;rsquo;s no native handling there.&lt;/p&gt;&#10;&lt;p&gt;There&amp;rsquo;s a great utility called &lt;a href="https://github.com/altdesktop/playerctl"&gt;playerctl&lt;/a&gt; that makes this really easy.&#10;If you&amp;rsquo;re on Fedora, run &lt;code&gt;dnf install playerctl&lt;/code&gt; to get started.&lt;/p&gt;&#10;&lt;p&gt;Next, you&amp;rsquo;ll need some hotkeys in i3/sway:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86AudioPlay exec playerctl play-pause&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86AudioNext exec playerctl next&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86AudioPrev exec playerctl previous&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Press &lt;code&gt;Mod+Shift+c&lt;/code&gt; to reload your Sway/i3 configuration.&lt;/p&gt;&#10;&lt;p&gt;These are the standard multimedia keys that many keyboards have, but my Ducky keyboard doesn&amp;rsquo;t have them.&#10;The keyboard does have the ability to send these keystrokes through, but we need to set up a macro for them!&#10;&lt;em&gt;Skip to the next section for that.&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;But before we go, playerctl handles all kinds of different multimedia players on your system:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; playerctl -l&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;firefox.instance4056&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;spotify&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I tend to use my media keys for Spotify most often, so I updated my Sway/i3 configuration to this:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;bindsym XF86AudioPlay exec playerctl -p spotify play-pause&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;bindsym XF86AudioNext exec playerctl -p spotify next&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;bindsym XF86AudioPrev exec playerctl -p spotify previous&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This ensures that my media keys won&amp;rsquo;t interfere with something in Firefox and will always control my Spotify media. 😉&lt;/p&gt;&#10;&lt;p&gt;🚨 &lt;strong&gt;Before going any further, check that &lt;code&gt;playerctl&lt;/code&gt; works!&lt;/strong&gt; 🚨&lt;/p&gt;&#10;&lt;p&gt;Run &lt;code&gt;playerctl -p spotify play-pause&lt;/code&gt; one time and your music should play if it wasn&amp;rsquo;t playing before, or it should pause if it was already playing.&#10;Run it one more time to ensure it does the opposite the second time.&#10;Use a different player or remove the &lt;code&gt;-p&lt;/code&gt; argument entirely to test it with other players.&lt;/p&gt;&#10;&lt;h2 id="rtem-read-the-excellent-manual"&gt;RTEM (Read the excellent manual)&lt;/h2&gt;&#10;&lt;p&gt;The Ducky One 2 has a &lt;a href="https://duckychannel.net/download/user_manual/2020/Ducky_One_One2_10in1_usermanual_ol.pdf"&gt;helpful manual&lt;/a&gt; in English and Chinese.&#10;We need a macro to get the multimedia keys working and that process isn&amp;rsquo;t easy to follow as it spans multiple pages.&lt;/p&gt;&#10;&lt;p&gt;📚 &lt;em&gt;If you need a manual for a different Ducky keyboard, their &lt;a href="https://www.duckychannel.com.tw/en/Support"&gt;support page&lt;/a&gt; has a wizard that helps you find the exact manual for your keyboard.&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;The good stuff starts at page 41 in my manual:&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="manual-page-41.png" alt="Manual page explaining how to switch between profiles"&gt;&lt;/p&gt;&#10;&lt;p&gt;First, determine which profile you want to use.&#10;In my case, I chose profile 2.&lt;/p&gt;&#10;&lt;p&gt;Next, we need to know which multimedia function keys are hidden away in the keyboard&amp;rsquo;s firmware:&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="manual-page-43.png" alt="Manual page covering multimedia keys"&gt;&lt;/p&gt;&#10;&lt;p&gt;For each key combination, we need to know which keys we want to press to trigger the multimedia key (letters above).&#10;I&amp;rsquo;m most interested in play/pause, previous track, and next track, so I&amp;rsquo;m building out my configuration like this:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Play/Pause: &lt;code&gt;Fn+End&lt;/code&gt; (key &lt;code&gt;D&lt;/code&gt;)&lt;/li&gt;&#10;&lt;li&gt;Previous track: &lt;code&gt;Fn+PgUp&lt;/code&gt; (key &lt;code&gt;G&lt;/code&gt;)&lt;/li&gt;&#10;&lt;li&gt;Next track: &lt;code&gt;Fn+PgDown&lt;/code&gt; (key &lt;code&gt;F&lt;/code&gt;)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="making-macros"&gt;Making macros&lt;/h2&gt;&#10;&lt;p&gt;Now we&amp;rsquo;re ready to record a macro.&lt;/p&gt;&#10;&lt;p&gt;Switch to profile 2 with &lt;code&gt;Fn+2&lt;/code&gt;.&#10;The LED underneath the &lt;em&gt;2&lt;/em&gt; should blink briefly.&lt;/p&gt;&#10;&lt;p&gt;Enter macro mode by holding down &lt;code&gt;Fn&lt;/code&gt; and &lt;code&gt;Ctrl&lt;/code&gt; for three seconds (press &lt;code&gt;Fn&lt;/code&gt; first, though).&#10;The keyboard indicators at the top right of the keyboard should be blinking slowly.&lt;/p&gt;&#10;&lt;p&gt;Carefully set the macro:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Hold down &lt;code&gt;Fn&lt;/code&gt; and &lt;code&gt;Ctrl&lt;/code&gt; for three seconds. Indicator lights should blink slowly.&lt;/li&gt;&#10;&lt;li&gt;Hold &lt;code&gt;Fn&lt;/code&gt; and press &lt;code&gt;End&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Hold &lt;code&gt;Fn&lt;/code&gt;, then hold the Windows key, then press &lt;code&gt;D&lt;/code&gt; (for play/pause). Release all keys after pressing &lt;code&gt;D&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Exit macro recording mode by holding &lt;code&gt;Fn&lt;/code&gt; and pressing &lt;code&gt;Ctrl&lt;/code&gt;. Release all keys.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Repeat for previous track:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Hold down &lt;code&gt;Fn&lt;/code&gt; and &lt;code&gt;Ctrl&lt;/code&gt; for three seconds. Indicator lights should blink slowly.&lt;/li&gt;&#10;&lt;li&gt;Hold &lt;code&gt;Fn&lt;/code&gt; and press &lt;code&gt;PgUp&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Hold &lt;code&gt;Fn&lt;/code&gt;, then hold the Windows key, then press &lt;code&gt;G&lt;/code&gt; (for previous track). Release all keys after pressing &lt;code&gt;D&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Exit macro recording mode by holding &lt;code&gt;Fn&lt;/code&gt; and pressing &lt;code&gt;Ctrl&lt;/code&gt;. Release all keys.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Finally for next track:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Hold down &lt;code&gt;Fn&lt;/code&gt; and &lt;code&gt;Ctrl&lt;/code&gt; for three seconds. Indicator lights should blink slowly.&lt;/li&gt;&#10;&lt;li&gt;Hold &lt;code&gt;Fn&lt;/code&gt; and press &lt;code&gt;PgDn&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Hold &lt;code&gt;Fn&lt;/code&gt;, then hold the Windows key, then press &lt;code&gt;F&lt;/code&gt; (for next track). Release all keys after pressing &lt;code&gt;D&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Exit macro recording mode by holding &lt;code&gt;Fn&lt;/code&gt; and pressing &lt;code&gt;Ctrl&lt;/code&gt;. Release all keys.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="testing"&gt;Testing&lt;/h2&gt;&#10;&lt;p&gt;You did test &lt;code&gt;playerctl&lt;/code&gt; by itself earlier, right? 😜&#10;If you didn&amp;rsquo;t, go back to the first section and save yourself some frustration.&lt;/p&gt;&#10;&lt;p&gt;Press &lt;code&gt;Fn+End&lt;/code&gt; and your music should toggle between playing and paused.&#10;Press &lt;code&gt;Fn+End&lt;/code&gt; once more and it should toggle again.&lt;/p&gt;&#10;&lt;p&gt;If &lt;code&gt;playerctl&lt;/code&gt; works on the command line, but doesn&amp;rsquo;t work via the keyboard macro, you can go back through the macro setting steps above.&#10;You can also clear a macro from a key by holding &lt;code&gt;Fn+Ctrl&lt;/code&gt; for three seconds, tapping the misconfigured key, tapping the same key again, and pressing &lt;code&gt;Fn+Ctrl&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;Enjoy your quick access to multimedia keys! ⌨ 🎶&lt;/p&gt;&#10;</description></item><item><title>Clocks in multiple time zones with i3status</title><link>https://major.io/p/i3status-timezones/</link><pubDate>Sun, 04 Dec 2022 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/i3status-timezones/</guid><description>&lt;p&gt;Many of my coworkers are on Central European Time (CET) and they&amp;rsquo;re seven hours ahead of me &lt;em&gt;(most of the time)&lt;/em&gt;.&#10;Then there are those weird times of year where they move their clocks for Daylight Savings Time before we do in the USA.&lt;/p&gt;&#10;&lt;p&gt;I have a handy clock in my &lt;a href="https://i3wm.org/i3status/"&gt;i3status&lt;/a&gt; bar, but I&amp;rsquo;d like to track my coworkers&amp;rsquo; timezones in addition to my own.&lt;/p&gt;&#10;&lt;h2 id="configuration"&gt;Configuration&lt;/h2&gt;&#10;&lt;p&gt;By default, i3status looks for its configuration file in &lt;code&gt;~/.config/i3status/config&lt;/code&gt;.&#10;Open up the configuration file in your favorite editor and add two pieces.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m most interested in CET, so I&amp;rsquo;ll use Berlin for my extra clock.&#10;First, add two &lt;code&gt;tztime&lt;/code&gt; lines near the top:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;order += &amp;#34;tztime berlin&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;order += &amp;#34;tztime local&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then add the corresponding sections at the end of the configuration file:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tztime local {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; format = &amp;#34;%Y-%m-%d %H:%M:%S 🇺🇸&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tztime berlin {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; format = &amp;#34;%H:%M 🇩🇪&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; timezone = &amp;#34;Europe/Berlin&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; hide_if_equals_localtime = true&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;hide_if_equals_localtime&lt;/code&gt; configuration ensures that I only see one clock if my local timezone switches to CET.&#10;Emoji flags add a little bit of flair to the clocks in the status bar. 😉&lt;/p&gt;&#10;&lt;p&gt;Here&amp;rsquo;s how it looks (with the &lt;a href="https://github.com/source-foundry/Hack"&gt;Hack&lt;/a&gt; font):&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="i3status.png" alt="i3status screenshot"&gt;&lt;/p&gt;&#10;&lt;h2 id="apply-the-change"&gt;Apply the change&lt;/h2&gt;&#10;&lt;p&gt;Reload the i3 configuration with &lt;code&gt;Mod+Shift+c&lt;/code&gt; and restart i3 with &lt;code&gt;Mod+Shift+r&lt;/code&gt;.&lt;/p&gt;&#10;</description></item><item><title>Make screenshots quickly in i3 with maim and xclip</title><link>https://major.io/p/i3-screenshot/</link><pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/i3-screenshot/</guid><description>&lt;p&gt;My daily workflow includes taking tons of screenshots.&#10;I&amp;rsquo;m constantly relaying views of different data or results of various work between different chat systems and emails.&#10;As with all things that I do often, I look for ways to optimize them as much as possible.&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;(I&amp;rsquo;m that guy who wrote a post on an &lt;a href="https://major.io/p/efficient-emoji-experience-wayland/"&gt;efficient emoji workflow in Wayland&lt;/a&gt;.)&lt;/em&gt; 😂&lt;/p&gt;&#10;&lt;h1 id="goals"&gt;Goals&lt;/h1&gt;&#10;&lt;p&gt;Screenshots must be easy to take and share, period.&#10;Modern versions of Firefox make this extremely easy with the built-in screenshot mechanism.&lt;/p&gt;&#10;&lt;p&gt;Right click an element on a web page, choose &lt;strong&gt;Take Screenshot&lt;/strong&gt; from the pop-up and screenshot a whole page or just a single DOM element.&#10;From there, you can copy it directly to the clipboard and paste it elsewhere or save it to a file.&lt;/p&gt;&#10;&lt;p&gt;I want something as close to that for the i3 desktop environment.&lt;/p&gt;&#10;&lt;h1 id="the-maim-game"&gt;The maim game&lt;/h1&gt;&#10;&lt;p&gt;Fortunately, there&amp;rsquo;s a piece of software called &lt;a href="https://github.com/naelstrof/maim"&gt;maim&lt;/a&gt;!&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&#10;The README in the repository contains lots of helpful examples for basic screenshots all the way up to fancy conversions with drop shadows. ✨&lt;/p&gt;&#10;&lt;p&gt;My use case is quite simple.&#10;I want to press a key, get a selection crosshair, make my selection, and get my screenshot copied to the clipboard.&lt;/p&gt;&#10;&lt;p&gt;Here&amp;rsquo;s how I do it in i3:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym Print exec maim -s -u | xclip -selection clipboard -t image/png -i&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s break this down:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;First, we use &lt;code&gt;bindsym&lt;/code&gt; to bind the Print Screen (&lt;code&gt;Print&lt;/code&gt;) key&lt;/li&gt;&#10;&lt;li&gt;Hitting Print Screen runs &lt;code&gt;maim&lt;/code&gt; and pops a selection crosshair (&lt;code&gt;-s&lt;/code&gt;) and hides the cursor (&lt;code&gt;u&lt;/code&gt;)&lt;/li&gt;&#10;&lt;li&gt;Once the selection is made, the image pipes straight into &lt;code&gt;xclip&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;xclip&lt;/code&gt; stores the image in the clipboard with the &lt;code&gt;image/png&lt;/code&gt; mime type&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I&amp;rsquo;m able to go to my favorite application or browser window with Slack, Discord, or Mastodon open and simply paste the image into my message. 🏁&lt;/p&gt;&#10;&lt;div class="footnotes" role="doc-endnotes"&gt;&#10;&lt;hr&gt;&#10;&lt;ol&gt;&#10;&lt;li id="fn:1"&gt;&#10;&lt;p&gt;Before you get upset with the name, keep in mind that it&amp;rsquo;s the shortened version of &lt;strong&gt;make image&lt;/strong&gt;. 😉&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>Manage sound volume with volumeicon in i3</title><link>https://major.io/p/i3-volumeicon/</link><pubDate>Sun, 27 Nov 2022 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/i3-volumeicon/</guid><description>&lt;p&gt;Now that &lt;a href="https://fedoramagazine.org/announcing-fedora-37/"&gt;Fedora 37&lt;/a&gt; launched, I decided to wipe my main laptop and do a clean installation.&#10;I made some poor configuration choices while in a hurry over the past year and the mess finally caught up with me.&lt;/p&gt;&#10;&lt;p&gt;The latest version of the &lt;a href="https://spins.fedoraproject.org/en/i3/"&gt;i3 spin&lt;/a&gt; caught my eye and I used it for the installation.&#10;Once my laptop booted up, I noticed a volume icon in my system tray that appeared automatically.&#10;I&amp;rsquo;ve normally used &lt;a href="https://github.com/christophgysin/pasystray"&gt;pasystray&lt;/a&gt; for this task, but &lt;a href="https://github.com/Maato/volumeicon"&gt;volumeicon&lt;/a&gt; came with the i3 spin.&lt;/p&gt;&#10;&lt;p&gt;The volumeicon tray icon has a few handy features:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Notifications via libnotify (or GTK) when something sound-related changes&lt;/li&gt;&#10;&lt;li&gt;Quick access to muting and unmuting a sound device via clicking the icon&lt;/li&gt;&#10;&lt;li&gt;Access to sound mixers and preferences via a right click&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;However, it also catches key presses from my volume keys on my laptop.&#10;Catching the volume keys is disabled by default but you can change that via its configuration file.&lt;/p&gt;&#10;&lt;p&gt;Normally, I would have an i3 configuration snippet like this one:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Use pactl to adjust volume in PulseAudio.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;set $refresh_i3status killall -SIGUSR1 i3status&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% &amp;amp;&amp;amp; $refresh_i3status&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% &amp;amp;&amp;amp; $refresh_i3status&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle &amp;amp;&amp;amp; $refresh_i3status&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle &amp;amp;&amp;amp; $refresh_i3status&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That works fine, but volumeicon can handle this for us.&#10;Here&amp;rsquo;s my current volumeicon configuration in &lt;code&gt;~/.config/volumeicon/volumeicon&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[Alsa]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;card&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;default&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[Notification]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;show_notification&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;notification_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[StatusIcon]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;stepsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;5&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;onclick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;pavucontrol&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Default&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;use_panel_specific_icons&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;lmb_slider&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;mmb_mute&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;use_horizontal_slider&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;show_sound_level&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;use_transparent_background&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;[Hotkeys]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;up_enabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;down_enabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;mute_enabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;up&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;XF86AudioRaiseVolume&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;down&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;XF86AudioLowerVolume&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;mute&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;XF86AudioMute&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;ve changed a few things from the defaults:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Enabled notifications via GTK &lt;em&gt;(libnotify notifications didn&amp;rsquo;t look great)&lt;/em&gt;&lt;/li&gt;&#10;&lt;li&gt;Enabled the volume keys in the &lt;code&gt;[Hotkeys]&lt;/code&gt; section&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;i3 takes care of starting the icon for me with &lt;code&gt;exec&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;exec --no-startup-id volumeicon&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Log out and log in again to test the changes.&lt;/p&gt;&#10;</description></item><item><title>Disable HiDPI in alacritty</title><link>https://major.io/p/disable-hidpi-alacritty/</link><pubDate>Fri, 25 Mar 2022 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/disable-hidpi-alacritty/</guid><description>&lt;p&gt;The &lt;a href="https://alacritty.org/"&gt;alacritty&lt;/a&gt; terminal remains my favorite terminal because of its simple&#10;configuration, regular expression hints, and incredible performance. It&amp;rsquo;s written in&#10;Rust and it uses OpenGL to accelerate the terminal output.&lt;/p&gt;&#10;&lt;p&gt;I also like high DPI displays. My desktop has two 4K monitors (3840x2160) and my &lt;a href="https://major.io/2021/10/23/thinkpad-x1-nano-gen1-review/"&gt;X1&#10;Nano&lt;/a&gt; (2160x1350) crams plenty of pixels into a small display. With Linux, you get two&#10;options:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Use HiDPI with larger fonts for a clear, crisp display. It really does look pretty.&lt;/li&gt;&#10;&lt;li&gt;Disable HiDPI and get a lot more screen real estate with smaller fonts. Prepare to&#10;squint. 🥸&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;I prefer more screen real estate (and I wear glasses), so I usually disable HiDPI on&#10;most of my machines. After wiping my laptop and starting over recently, I realized my&#10;alacritty terminals had massive fonts again. If only I had written down how I fixed it.&#10;🤔&lt;/p&gt;&#10;&lt;p&gt;Lucky for you, I&amp;rsquo;m writing about those options here:&lt;/p&gt;&#10;&lt;h2 id="disable-hidpi-just-for-alacritty"&gt;Disable HiDPI just for alacritty&lt;/h2&gt;&#10;&lt;p&gt;You might be saying &amp;ldquo;just lower the font size in the alacritty configuration&amp;rdquo; and call&#10;it a day. Well, that method leaves you with smaller fonts, sure, but then there are gaps&#10;in spacing between character and lines. It just looks clunky.&lt;/p&gt;&#10;&lt;p&gt;There&amp;rsquo;s an environment variable we can use: &lt;code&gt;WINIT_X11_SCALE_FACTOR&lt;/code&gt;. To disable HiDPI&#10;and use pixels at a 1:1 ratio, set the following option in your alacritty configuration&#10;file (usually &lt;code&gt;~/.config/alacritty/alacritty.yml&lt;/code&gt;):&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;WINIT_X11_SCALE_FACTOR&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Close all of your alacritty terminals and open a new one. You should now see smaller&#10;fonts and a terminal with HiDPI disabled.&lt;/p&gt;&#10;&lt;h2 id="disable-hidpi-across-the-board"&gt;Disable HiDPI across the board&lt;/h2&gt;&#10;&lt;p&gt;In many of the full-featured window manager, such as GNOME or KDE, you can disable HiDPI&#10;within the system settings. The i3 window manager requires some manual work (as you&#10;might expect).&lt;/p&gt;&#10;&lt;p&gt;From the old days of X comes &lt;code&gt;.Xresources&lt;/code&gt;! These &lt;a href="https://wiki.archlinux.org/title/X_resources"&gt;X resources&lt;/a&gt; set all kinds of&#10;configuration options for all applications running under X. Here&amp;rsquo;s my current&#10;&lt;code&gt;~/.Xresources&lt;/code&gt; file:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;Xft.dpi: 96&#10;Xft.autohint: 0&#10;Xft.lcdfilter: lcddefault&#10;Xft.hintstyle: hintmedium&#10;Xft.hinting: 1&#10;Xft.antialias: 1&#10;Xft.rgba: rgb&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The first line sets the DPI to 96 (which is my preference). Increasing that number will&#10;take you closer to a HiDPI setting and potentially make text crisper, but larger.&#10;Lowering it will make text smaller and sometimes a bit ugly if you go below 85.&lt;/p&gt;&#10;&lt;p&gt;To use X resources, you first need &lt;code&gt;xrdb&lt;/code&gt;. On Fedora, install it, load your current&#10;configuration, and query it:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; dnf install /usr/bin/xrdb&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; xrdb -merge ~/.Xresources&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; xrdb -query -all&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Xft.antialias:&#9;1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Xft.autohint:&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Xft.dpi:&#9;96&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Xft.hinting:&#9;1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Xft.hintstyle:&#9;hintmedium&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Xft.lcdfilter:&#9;lcddefault&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Xft.rgba:&#9;rgb&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You need to quit most applications and start them again before you can see the DPI&#10;changes. In some situations, I needed to reboot to get the changes in place for all&#10;applications.&lt;/p&gt;&#10;</description></item><item><title>Backlight control with i3</title><link>https://major.io/p/backlight-control-with-i3/</link><pubDate>Thu, 14 Oct 2021 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/backlight-control-with-i3/</guid><description>&lt;p&gt;Controlling the LED backlight brightness on a laptop in Linux used to be a&#10;chore, but most window managers automatically configure the brightness buttons&#10;on your laptop. However, everything is much more customizable in i3 and it&#10;requires a little more configuration.&lt;/p&gt;&#10;&lt;h2 id="controlling-the-light"&gt;Controlling the light&lt;/h2&gt;&#10;&lt;p&gt;First off, we need something that allows us to control the brightness. There&amp;rsquo;s a&#10;perfectly named project called &lt;a href="https://haikarainen.github.io/light/"&gt;light&lt;/a&gt; that does exactly this task! In Fedora,&#10;install it via:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; sudo dnf -y install light&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can query the current brightness:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; light -G&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;5.00&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On my laptop, 5% is &lt;em&gt;very dim&lt;/em&gt;. Now we can increase the brightness using a simple&#10;command:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; light -A &lt;span class="m"&gt;5&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; light -G&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;9.99&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And we can bring it right back down:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; light -U &lt;span class="m"&gt;5&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; light -G&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;5.00&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="setting-up-hotkeys"&gt;Setting up hotkeys&lt;/h2&gt;&#10;&lt;p&gt;Open your i3 configuration (usually &lt;code&gt;~/.config/i3/config&lt;/code&gt;) and add the hotkey&#10;configuration:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Handle backlight.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86MonBrightnessUp exec light -A 5&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86MonBrightnessDown exec light -U 5&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Refresh the i3 configuration with &lt;code&gt;$mod + shift + r&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;Each time you press the brightness up button on your laptop, the brightness&#10;level goes up by 5%. The brightness down button lowers it by 5%.&#10;This is a good setup for me since I normally only need to adjust it by a few&#10;stops depending on ambient light.&lt;/p&gt;&#10;&lt;p&gt;However, if your lighting changes drastically from time to time, you can set up&#10;a different keybinding for a much more aggressive change:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Handle backlight.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86MonBrightnessUp exec light -A 5&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym XF86MonBrightnessDown exec light -U 5&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym shift+XF86MonBrightnessUp exec light -A 25&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym shift+XF86MonBrightnessDown exec light -U 25&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Hold shift and press brightness up or down. Now you are moving up and down by&#10;25% brightness each time. Enjoy! 💡&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;Photo credit: &lt;a href="https://unsplash.com/photos/UIjcuxmoiZw"&gt;Ariel on Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#10;</description></item><item><title>Enable dark mode in Firefox without changing themes</title><link>https://major.io/p/enable-dark-mode-in-firefox/</link><pubDate>Mon, 19 Jul 2021 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/enable-dark-mode-in-firefox/</guid><description>&lt;p&gt;Most modern web browsers, such as Firefox, take cues from the desktop&#10;environment or from themes applied to the browser to determine whether a user&#10;wants light or dark mode from websites. This is often done through the&#10;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme"&gt;prefers-color-scheme&lt;/a&gt; CSS media feature:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;day&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#eee&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;night&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;media&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;prefers-color-scheme&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;dark&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;day&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;dark-scheme&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;night&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;dark-scheme&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ddd&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;media&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;prefers-color-scheme&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;light&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;day&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;light-scheme&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#555&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;night&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;light-scheme&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#eee&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There are those situations where you want web pages to prefer a dark mode, but&#10;you don&amp;rsquo;t want to change your desktop settings or apply a darker theme to&#10;Firefox. You can follow these steps to prefer dark color schemes in Firefox:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Type &lt;code&gt;about:config&lt;/code&gt; in the address bar and press enter.&lt;/li&gt;&#10;&lt;li&gt;Click &lt;em&gt;Accept the Risk and Continue&lt;/em&gt;. (if you want to accept the risk) 😉&lt;/li&gt;&#10;&lt;li&gt;In the search box, type &lt;code&gt;ui.systemUsesDarkTheme&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Click the &lt;em&gt;Number&lt;/em&gt; radio button below the search box.&lt;/li&gt;&#10;&lt;li&gt;Press the plus (+) on the far right side.&lt;/li&gt;&#10;&lt;li&gt;Set the value to &lt;code&gt;1&lt;/code&gt; and press enter.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Now, close the &lt;code&gt;about:config&lt;/code&gt; page and load up a website that has dark color&#10;schemes available.&lt;/p&gt;&#10;&lt;p&gt;If you want to test the change quickly, just reload this page! My blog has light&#10;and dark color schemes set depending on what your browser prefers. 🎉 😎&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;Photo credit: &lt;a href="https://unsplash.com/photos/qi2hmCwlhcE"&gt;Andre Benz on Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#10;</description></item><item><title>Enable touchpad tap to click in i3</title><link>https://major.io/p/tray-icons-in-i3/</link><pubDate>Sun, 18 Jul 2021 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/tray-icons-in-i3/</guid><description>&lt;p&gt;One of the first things I look for on a fresh installation of a laptop is how to&#10;enable tap-to-click automatically. Most window managers and desktop environments&#10;make this easy with a control panel that has toggles or drop-down menus.&lt;/p&gt;&#10;&lt;p&gt;However, this requires a little more effort in i3. Fortunately, there are two&#10;routes to get it enabled: in xorg&amp;rsquo;s configuration or via your i3 configuration.&lt;/p&gt;&#10;&lt;h2 id="via-the-i3-configuration"&gt;Via the i3 configuration&lt;/h2&gt;&#10;&lt;p&gt;The advantage of this method is that it&amp;rsquo;s easy to configure and test out&#10;quickly. On the other hand, this configuration change will only affect i3 on&#10;your system. (Other window managers won&amp;rsquo;t be affected.)&lt;/p&gt;&#10;&lt;p&gt;Start with the &lt;code&gt;xinput&lt;/code&gt; command to determine which devices are on your system.&#10;If you&amp;rsquo;re on Fedora, just run &lt;code&gt;dnf install xinput&lt;/code&gt; to install it.&lt;/p&gt;&#10;&lt;p&gt;Here&amp;rsquo;s the output on my Lenovo ThinkPad T490:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;➜ xinput&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;⎡ Virtual core pointer &#9;id=2&#9;[master pointer (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;⎜ ↳ Virtual core XTEST pointer &#9;id=4&#9;[slave pointer (2)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;⎜ ↳ SynPS/2 Synaptics TouchPad &#9;id=12&#9;[slave pointer (2)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;⎜ ↳ TPPS/2 Elan TrackPoint &#9;id=13&#9;[slave pointer (2)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;⎣ Virtual core keyboard &#9;id=3&#9;[master keyboard (2)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; ↳ Virtual core XTEST keyboard &#9;id=5&#9;[slave keyboard (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; ↳ Power Button &#9;id=6&#9;[slave keyboard (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; ↳ Video Bus &#9;id=7&#9;[slave keyboard (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; ↳ Sleep Button &#9;id=8&#9;[slave keyboard (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; ↳ Integrated Camera: Integrated C &#9;id=9&#9;[slave keyboard (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; ↳ Integrated Camera: Integrated I &#9;id=10&#9;[slave keyboard (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; ↳ AT Translated Set 2 keyboard &#9;id=11&#9;[slave keyboard (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt; ↳ ThinkPad Extra Buttons &#9;id=14&#9;[slave keyboard (3)]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My touchpad is the second entry in the first group: &lt;em&gt;SynPS/2 Synaptics&#10;TouchPad&lt;/em&gt;. Now we can list all the properties of this device using the id number&#10;(12 in my case) or the full name:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;➜ xinput list-props &amp;#34;SynPS/2 Synaptics TouchPad&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Device &amp;#39;SynPS/2 Synaptics TouchPad&amp;#39;:&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;Device Enabled (187):&#9;1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;Coordinate Transformation Matrix (189):&#9;1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Tapping Enabled (322):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Tapping Enabled Default (323):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Tapping Drag Enabled (324):&#9;1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Tapping Drag Enabled Default (325):&#9;1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Tapping Drag Lock Enabled (326):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Tapping Drag Lock Enabled Default (327):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Tapping Button Mapping Enabled (328):&#9;1, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Tapping Button Mapping Default (329):&#9;1, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Natural Scrolling Enabled (330):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Natural Scrolling Enabled Default (331):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Disable While Typing Enabled (332):&#9;1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Disable While Typing Enabled Default (333):&#9;1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Scroll Methods Available (334):&#9;1, 1, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Scroll Method Enabled (335):&#9;1, 0, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Scroll Method Enabled Default (336):&#9;1, 0, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Click Methods Available (337):&#9;1, 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Click Method Enabled (338):&#9;1, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Click Method Enabled Default (339):&#9;1, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Middle Emulation Enabled (340):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Middle Emulation Enabled Default (341):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Accel Speed (342):&#9;0.000000&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Accel Speed Default (343):&#9;0.000000&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Accel Profiles Available (344):&#9;1, 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Accel Profile Enabled (345):&#9;1, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Accel Profile Enabled Default (346):&#9;1, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Left Handed Enabled (347):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Left Handed Enabled Default (348):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Send Events Modes Available (307):&#9;1, 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Send Events Mode Enabled (308):&#9;0, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Send Events Mode Enabled Default (309):&#9;0, 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;Device Node (310):&#9;&amp;#34;/dev/input/event4&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;Device Product ID (311):&#9;2, 7&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Drag Lock Buttons (349):&#9;&amp;lt;no items&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&#9;libinput Horizontal Scroll Enabled (350):&#9;1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The important line in the output is this one:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;libinput Tapping Enabled (322):&#9;0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s turn on tap-to-click for the touchpad:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;xinput set-prop &amp;#34;SynPS/2 Synaptics TouchPad&amp;#34; &amp;#34;libinput Tapping Enabled&amp;#34; 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Your tap-to-click should now work! If it doesn&amp;rsquo;t, go back to the list of input&#10;devices and double check that there isn&amp;rsquo;t another touchpad. Some laptops show&#10;multiple touchpads even though there&amp;rsquo;s only one in the system. This is due to&#10;extra buttons being labeled as a touchpad on some laptops.&lt;/p&gt;&#10;&lt;p&gt;Let&amp;rsquo;s make it permanent in the i3 configuration. Open up &lt;code&gt;~/.config/i3/config&lt;/code&gt;&#10;and add a line:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;exec xinput set-prop &amp;#34;SynPS/2 Synaptics TouchPad&amp;#34; &amp;#34;libinput Tapping Enabled&amp;#34; 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You&amp;rsquo;re all set!&lt;/p&gt;&#10;&lt;h2 id="via-the-xorg-configuration-method"&gt;Via the xorg configuration method&lt;/h2&gt;&#10;&lt;p&gt;This method affects all window managers on your machine, so keep that in mind.&#10;Make a new file at &lt;code&gt;/etc/X11/xorg.conf.d/touchpad-tap.conf&lt;/code&gt; and add the&#10;following:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Section &amp;#34;InputClass&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Identifier &amp;#34;libinput touchpad catchall&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; MatchIsTouchpad &amp;#34;on&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; MatchDevicePath &amp;#34;/dev/input/event*&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Driver &amp;#34;libinput&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Option &amp;#34;Tapping&amp;#34; &amp;#34;on&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;EndSection&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We&amp;rsquo;re telling xorg to apply this configuration to any libinput touchpad on the&#10;system (but you could use the specific name of the device here if you want), and&#10;we&amp;rsquo;re enabling the tapping option.&lt;/p&gt;&#10;&lt;p&gt;You can make this change effective immediately with:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;xinput set-prop &amp;#34;SynPS/2 Synaptics TouchPad&amp;#34; &amp;#34;libinput Tapping Enabled&amp;#34; 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The xorg configuration change takes effect when you log out of your X session or&#10;you reboot your computer.&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;Photo credit: &lt;a href="https://unsplash.com/photos/2Hzmz15wGik"&gt;pine watt on Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#10;</description></item><item><title>Customize GNOME from i3</title><link>https://major.io/p/customize-gnome-from-i3/</link><pubDate>Sun, 22 Sep 2019 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/customize-gnome-from-i3/</guid><description>&lt;p&gt;i3 has been my window manager of choice for a while and I really enjoy its&#10;simplicity and ease of use. I use plenty of gtk applications, such as Firefox&#10;and Evolution, and configuring them within i3 can be confusing.&lt;/p&gt;&#10;&lt;p&gt;This post covers a few methods to change configurations for GNOME and gtk&#10;applications from i3.&lt;/p&gt;&#10;&lt;h2 id="lxappearance"&gt;lxappearance&lt;/h2&gt;&#10;&lt;p&gt;Almost all of the gtk theming settings are available in &lt;a href="https://wiki.lxde.org/en/LXAppearance"&gt;lxappearance&lt;/a&gt;. You can&#10;change fonts, mouse cursors, icons, and colors. The application makes the&#10;changes easy to preview and you can install more icon sets if you wish.&lt;/p&gt;&#10;&lt;p&gt;Fedora already has lxappearance packaged and ready to go:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;$ sudo dnf install lxappearance&#10;$ lxappearance&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Although style changes are immediately applied in lxappearance, you need to&#10;restart all gtk applications to see the style changes there.&lt;/p&gt;&#10;&lt;p&gt;lxappearance writes GTK 2.0 and GTK 3.0 configuration files:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;GTK 2.0: &lt;code&gt;~/.gtkrc-2.0&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;GTK 3.0: &lt;code&gt;~/.config/gtk-3.0/settings.ini&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="gnome-control-center"&gt;gnome-control-center&lt;/h2&gt;&#10;&lt;p&gt;Recent versions of GNOME bundle all of the system settings into a single&#10;application called &lt;code&gt;gnome-control-center&lt;/code&gt;. This normally starts right up in&#10;GNOME, but i3 is a little trickier since it doesn&amp;rsquo;t have some of the same&#10;environment variables set:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;$ gnome-control-center&#10;**&#10;ERROR:../shell/cc-shell-model.c:458:cc_shell_model_set_panel_visibility: assertion failed: (valid)&#10;[1] 837 abort (core dumped) gnome-control-center&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The problem is a missing environment variable: &lt;code&gt;XDG_CURRENT_DESKTOP&lt;/code&gt;. We can&#10;set that on the command line and everything works:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;env XDG_CURRENT_DESKTOP=GNOME gnome-control-center&#10;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="gnome-tweaks"&gt;gnome-tweaks&lt;/h2&gt;&#10;&lt;p&gt;The &lt;code&gt;gnome-tweaks&lt;/code&gt; application has been around for a long time and it works&#10;well from i3. Install it in Fedora and run it:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;$ sudo dnf install gnome-tweaks&#10;$ gnome-tweaks&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Although many of the configurations inside gnome-tweaks match up with&#10;lxappearance, gnome-tweaks offers an added benefit: it changes the&#10;configuration inside GNOME&amp;rsquo;s key-based configuration system (dconf). This is&#10;required for some applications, such as Firefox.&lt;/p&gt;&#10;&lt;p&gt;You can also open up &lt;code&gt;dconf-editor&lt;/code&gt; and make these changes manually in&#10;&lt;code&gt;/org/gnome/desktop/interface&lt;/code&gt;, but gnome-tweaks has a much more user-friendly&#10;interface.&lt;/p&gt;&#10;</description></item><item><title>Automatic floating windows in i3</title><link>https://major.io/p/automatic-floating-windows-in-i3/</link><pubDate>Fri, 08 Feb 2019 00:00:00 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/automatic-floating-windows-in-i3/</guid><description>&lt;p&gt;The &lt;a href="https://i3wm.org/"&gt;i3 window manager&lt;/a&gt; is a fast window manager that helps you keep all of&#10;your applications in the right place. It automatically tiles windows and can&#10;manage those tiles across multiple virtual desktops.&lt;/p&gt;&#10;&lt;p&gt;However, there are certain applications that I really prefer in a floating&#10;window. Floating windows do not get tiled and they can easily be dragged&#10;around with your mouse. They&amp;rsquo;re the type of windows you expect to see on&#10;other non-tiling desktops such as GNOME or KDE.&lt;/p&gt;&#10;&lt;h2 id="convert-a-window-to-floating-temporarily"&gt;Convert a window to floating temporarily&lt;/h2&gt;&#10;&lt;p&gt;If you have an existing window that you prefer to float, select that window&#10;and press &lt;em&gt;Mod + Shift + Space bar&lt;/em&gt;. The window will pop up in front of the&#10;tiled windows and you can easily move it with your mouse.&lt;/p&gt;&#10;&lt;p&gt;Depending on your configuration, you may be able to resize it by grabbing a&#10;corner of the window with your mouse. You can also assign a key combination&#10;for resizing in your i3 configuration file (usually &lt;code&gt;~/.config/i3/config&lt;/code&gt;):&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# resize window (you can also use the mouse for that)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mode &amp;#34;resize&amp;#34; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; bindsym Left resize shrink width 10 px or 10 ppt&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; bindsym Down resize grow height 10 px or 10 ppt&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; bindsym Up resize shrink height 10 px or 10 ppt&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; bindsym Right resize grow width 10 px or 10 ppt&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; bindsym Return mode &amp;#34;default&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; bindsym Escape mode &amp;#34;default&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; bindsym $mod+r mode &amp;#34;default&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bindsym $mod+r mode &amp;#34;resize&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With this configuration, simply press &lt;em&gt;Mod + r&lt;/em&gt; and use the arrow keys to&#10;grow or shrink the window&amp;rsquo;s borders.&lt;/p&gt;&#10;&lt;h2 id="always-float-certain-windows"&gt;Always float certain windows&lt;/h2&gt;&#10;&lt;p&gt;For those windows that you always want to be floating no matter what, i3 has&#10;a solution for that, too. Just tell i3 how to identify your windows and&#10;ensure &lt;code&gt;floating enable&lt;/code&gt; appears in the i3 config:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;for_window [window_role=&amp;#34;About&amp;#34;] floating enable&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;for_window [class=&amp;#34;vlc&amp;#34;] floating enable&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;for_window [title=&amp;#34;Authy&amp;#34;] floating enable&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the example above, I have a few windows always set to be floating:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;[window_role=&amp;quot;About&amp;quot;]&lt;/code&gt; - Any of the &amp;ldquo;About&amp;rdquo; windows in various applications&#10;that are normally opened by &lt;em&gt;Help -&amp;gt; About&lt;/em&gt;.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;[class=&amp;quot;vlc&amp;quot;]&lt;/code&gt; - The VLC media player can be a good one to float if you&#10;need to stuff it away in a corner.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;[title=&amp;quot;Authy&amp;quot;]&lt;/code&gt; - Authy&amp;rsquo;s chrome extension looks downright silly as a&#10;tiled window.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Any time these windows are spawned, they will automatically appear as&#10;floating windows. You can always switch them back to tiled manually by&#10;pressing &lt;em&gt;Mod + Shift + Space bar&lt;/em&gt;.&lt;/p&gt;&#10;&lt;h2 id="identifying-windows"&gt;Identifying windows&lt;/h2&gt;&#10;&lt;p&gt;Identifying windows in the way that i3 cares about can be challenging.&#10;Knowing when to use &lt;code&gt;window_role&lt;/code&gt; or &lt;code&gt;class&lt;/code&gt; for a window isn&amp;rsquo;t very&#10;intuitive. Fortunately, there&amp;rsquo;s a great script from an &lt;a href="https://faq.i3wm.org/question/2172/how-do-i-find-the-criteria-for-use-with-i3-config-commands-like-for_window-eg-to-force-splashscreens-and-dialogs-to-show-in-floating-mode.1.html"&gt;archived i3 faq&#10;thread&lt;/a&gt; that makes this easy:&lt;/p&gt;&#10;&lt;script src="https://gist.github.com/major/ff11ccdd73941109abb4ac2d35c976eb.js"&gt;&lt;/script&gt;&#10;&lt;p&gt;Download this script to your system, make it executable (&lt;code&gt;chmod +x i3-get-window-criteria&lt;/code&gt;), and run it. As soon as you do that, a plus (+) icon&#10;will replace your normal mouse cursor. Click on the window you care about and&#10;look for the output in your terminal where you ran the&#10;&lt;code&gt;i3-get-window-criteria&lt;/code&gt; script.&lt;/p&gt;&#10;&lt;p&gt;On my system, clicking on a terminator terminal window gives me:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[class=&amp;#34;Terminator&amp;#34; id=37748743 instance=&amp;#34;terminator&amp;#34; title=&amp;#34;major@indium:~&amp;#34;]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If I wanted to float all terminator windows, I could add this to my i3&#10;configuration file:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;for_window [class=&amp;#34;Terminator&amp;#34;] floating enable&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="float-in-a-specific-workspace"&gt;Float in a specific workspace&lt;/h2&gt;&#10;&lt;p&gt;Do you need a window to always float on a specific workspace? i3 can do that,&#10;too!&lt;/p&gt;&#10;&lt;p&gt;Let&amp;rsquo;s go back to the example with VLC. Let&amp;rsquo;s consider that we have a really&#10;nice 4K display where we always want to watch movies and that&amp;rsquo;s where&#10;workspace 2 lives. We can tell i3 to always float the VLC window on workspace&#10;2 with this configuration:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;set $ws1 &amp;#34;1: main&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;set $ws2 &amp;#34;2: 4kdisplay&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;for_window [class=&amp;#34;vlc&amp;#34;] floating enable&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;for_window [class=&amp;#34;vlc&amp;#34;] move to workspace $ws2&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Restart i3 to pick up the new changes (usually &lt;em&gt;Mod + Shift + R&lt;/em&gt;) and start&#10;VLC. It should appear on workspace 2 as a floating window!&lt;/p&gt;&#10;</description></item></channel></rss>