dwl.html (7727B)
1 <p>My first rather serious linux system should be built on a Thinkpad 2 x61s in 2023. Due to a lack in performence I thought about installing 3 only the most minimal software on it.</p> 4 <p>So I came to see the famouse Thinkpad Arch combination. (I know and 5 knew that it was not the most minimal os possible, but I was convinced) 6 When trying to find the most minimal and fast window manager found the 7 perfect fit: <code>dwm</code>.</p> 8 <p><code>dwm</code> became my wm that just worked.</p> 9 <hr /> 10 <p>However as I continued to gain understanding of how Xorg works and as 11 I understood the bloat in <code>X</code>, I found it hard to swich. On 12 YouTube I came across <code>dwl</code> a project about translating 13 <code>dwl</code> to work with <code>wlroots</code>.</p> 14 <p>Even though being familiar with the rather difficult to install 15 <code>dwm</code>, I wasn’t able to even compile <code>dwl</code>. Now I 16 understand and give you - the reader - a path to follow.</p> 17 <div class="sourceCode" id="cb1"><pre 18 class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> dnf install <span class="dt">\</span></span> 19 <span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> libinput libinput-devel <span class="dt">\</span></span> 20 <span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> wayland wayland-devel <span class="dt">\</span></span> 21 <span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> wlroots wlroots-devel <span class="dt">\</span></span> 22 <span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> xkbcommon xkbcommon-devel <span class="dt">\</span></span> 23 <span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> wayland-protocols <span class="dt">\</span></span> 24 <span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> pkgconf-pkg-config</span></code></pre></div> 25 <div class="sourceCode" id="cb2"><pre 26 class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> clone https://codeberg.org/dwl/dwl.git</span> 27 <span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> dwl</span> 28 <span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> checkout v0.7</span> 29 <span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span> 30 <span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> make install</span></code></pre></div> 31 <div class="sourceCode" id="cb3"><pre 32 class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> dnf install <span class="dt">\</span></span> 33 <span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> libinput libinput-devel <span class="dt">\</span></span> 34 <span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> wayland wayland-devel <span class="dt">\</span></span> 35 <span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a> wlroots wlroots-devel <span class="dt">\</span></span> 36 <span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> xkbcommon xkbcommon-devel <span class="dt">\</span></span> 37 <span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a> wayland-protocols-devel <span class="dt">\</span></span> 38 <span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a> pkgconf-pkg-config <span class="dt">\</span></span> 39 <span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a> meson ninja-build <span class="dt">\</span></span> 40 <span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a> gcc</span></code></pre></div> 41 <div class="sourceCode" id="cb4"><pre 42 class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> clone https://github.com/waycrate/wmenu.git</span> 43 <span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> wmenu</span> 44 <span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">meson</span> setup build</span> 45 <span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">ninja</span> <span class="at">-C</span> build</span> 46 <span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> ninja <span class="at">-C</span> build install</span></code></pre></div> 47 <hr /> 48 <p>Edits to <code>sources/dwl/config.h</code>:</p> 49 <div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="dt">static</span> <span class="dt">const</span> <span class="dt">char</span> <span class="op">*</span>termcmd<span class="op">[]</span> <span class="op">=</span> <span class="op">{</span> <span class="st">"ghostty"</span><span class="op">,</span> NULL <span class="op">};</span></span></code></pre></div> 50 <div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="dt">static</span> <span class="dt">const</span> MonitorRule monrules<span class="op">[]</span> <span class="op">=</span> <span class="op">{</span></span> 51 <span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="co">/* macbook m1 14" */</span></span> 52 <span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="op">{</span> <span class="st">"eDP-1"</span><span class="op">,</span> <span class="fl">0.5</span><span class="bu">f</span><span class="op">,</span> <span class="dv">1</span><span class="op">,</span> <span class="dv">2</span><span class="op">,</span> <span class="op">&</span>layouts<span class="op">[</span><span class="dv">0</span><span class="op">],</span> WL_OUTPUT_TRANSFORM_NORMAL<span class="op">,</span> <span class="op">-</span><span class="dv">1</span><span class="op">,</span> <span class="op">-</span><span class="dv">1</span> <span class="op">},</span></span> 53 <span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="op">};</span></span></code></pre></div> 54 <div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="dt">static</span> <span class="dt">const</span> <span class="kw">struct</span> xkb_rule_names xkb_rules <span class="op">=</span> <span class="op">{</span></span> 55 <span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="co">/* default:</span></span> 56 <span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="co"> .options = NULL,</span></span> 57 <span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a><span class="co"> */</span></span> 58 <span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span>layout <span class="op">=</span> <span class="st">"de"</span><span class="op">,</span></span> 59 <span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span>variant <span class="op">=</span> <span class="st">"latin1"</span><span class="op">,</span></span> 60 <span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a><span class="op">};</span></span></code></pre></div>