<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>wayland &amp;mdash; in ♥️ with linux</title>
    <link>https://inlovewithlinux.com/tag:wayland</link>
    <description>After 20 years with macOS, I returned to Linux &lt;span&gt;many&lt;/span&gt; days ago, including &lt;strong&gt;some&lt;/strong&gt; days without hopping on  Debian Stable.</description>
    <pubDate>Sat, 18 Apr 2026 15:06:35 +0200</pubDate>
    <item>
      <title>dock in waybar</title>
      <link>https://inlovewithlinux.com/dock-in-waybar</link>
      <description>&lt;![CDATA[&#xA;&#xA;As a former mac user, I always liked the dock. Since I am now back at niri, I wanted to have not only a statusbar (with waybar), but also a kind of dock again.&#xA;&#xA;As I now had a lot of experience with customising the waybar, it made sense to convert it into a kind of dock.&#xA;&#xA;One quickly reaches the limitations of waybar, but with 1-2 tricks I can be quite satisfied (at the moment).&#xA;&#xA;DotFiles:&#xA;&#xA;You can find the whole setup in my dotfiles on codeberg: https://codeberg.org/Nasendackel/dotfiles&#xA;&#xA;Step 1: A “Start” Menu&#xA;&#xA;You need to create a custom module that accesses an XML file. The commands are specified in the config of waybar and the XML provides the menu structure in GTK.&#xA;&#xA;waybar conf:&#xA;&#xA;&#34;custom/startmenu&#34;: {&#xA;    &#34;format&#34; : &#34; &#34;,&#xA;    &#34;tooltip&#34;: false,&#xA;    &#34;menu&#34;: &#34;on-click&#34;,&#xA;    &#34;menu-file&#34;: &#34;~/.config/waybar/startmenu.xml&#34;,&#xA;    &#34;menu-actions&#34;: {&#xA;&#x9;&#x9;&#34;about&#34;: &#34;~/.config/niri/bin/about.sh&#34;,&#xA;&#x9;&#x9;&#34;info&#34;: &#34;resources&#34;,&#xA;        &#x9;&#34;shutdown&#34;: &#34;systemctl poweroff&#34;,&#xA;        &#x9;&#34;reboot&#34;: &#34;systemctl reboot&#34;,&#xA;&#x9;&#x9;&#34;suspend&#34;: &#34;systemctl suspend&#34;,&#xA;&#x9;&#x9;&#34;lock&#34;: &#34;swaylock -f&#34;,&#xA;    },&#xA;},&#xA;&#xA;startmenu.xml:&#xA;&#xA;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#xA;interface&#xA;object class=&#34;GtkMenu&#34; id=&#34;menu&#34;&#xA; &#x9;child&#xA;&#x9;&#x9;object class=&#34;GtkMenuItem&#34; id=&#34;about&#34;&#xA;&#x9;&#x9;&#x9;property name=&#34;label&#34; About/property&#xA;    &#x9;&#x9;/object&#xA;&#x9;/child&#xA;&#x9;child&#xA;&#x9;&#x9;object class=&#34;GtkMenuItem&#34; id=&#34;info&#34;&#xA;&#x9;&#x9;&#x9;property name=&#34;label&#34; Ressources/property&#xA;    &#x9;&#x9;/object&#xA;&#x9;/child&#xA;&#x9;child&#xA;      &#x9;&#x9;object class=&#34;GtkSeparatorMenuItem&#34; id=&#34;delimiter1&#34;/&#xA;    &#x9;/child&#xA;    &#x9;child&#xA;&#x9;&#x9;object class=&#34;GtkMenuItem&#34; id=&#34;lock&#34;&#xA;&#x9;&#x9;&#x9;property name=&#34;label&#34; Lock Screen/property&#xA;        &#x9;/object&#xA;&#x9;/child&#xA;&#x9;child&#xA;        &#x9;object class=&#34;GtkMenuItem&#34; id=&#34;suspend&#34;&#xA;&#x9;&#x9;&#x9;property name=&#34;label&#34; Suspend/property&#xA;        &#x9;/object&#xA;&#x9;/child&#xA;   &#x9;child&#xA;        &#x9;object class=&#34;GtkMenuItem&#34; id=&#34;reboot&#34;&#xA;&#x9;&#x9;&#x9;property name=&#34;label&#34;󰑓 Reboot/property&#xA;        &#x9;/object&#xA;    &#x9;/child&#xA;  &#x9;child&#xA;        &#x9;object class=&#34;GtkMenuItem&#34; id=&#34;shutdown&#34;&#xA;&#x9;&#x9;&#x9;property name=&#34;label&#34;  Shutdown/property&#xA;        &#x9;/object&#xA;&#x9;/child&#xA;/object&#xA;/interface&#xA;&#xA;Step 2: Taskbar Module&#xA;&#xA;The taskbar module lists all open apps. Unfortunately, you can only create shortcuts or list open apps with the Waybar. A classic dock is not possible. However, since I have assigned all important apps to shortcuts, only the display of open apps is sufficient for me.&#xA;&#xA;It is important to set ‘sort-by-app-id’ to true so that the apps are grouped and sorted accordingly (see Step 4).&#xA;&#xA;waybar conf:&#xA;&#xA;&#34;wlr/taskbar&#34;: {&#xA;&#x9;&#34;format&#34;: &#34;{icon}&#34;,&#xA;&#x9;&#34;icon-theme&#34;: &#34;Papirus&#34;,&#xA;&#x9;&#34;icon-size&#34;: 32,&#xA;&#x9;&#34;on-click&#34;: &#34;minimize-raise&#34;,&#xA;&#x9;&#34;active-first&#34;: false,&#xA;&#x9;&#34;sort-by-app-id&#34;: true,&#xA;&#x9;&#34;appids-mapping&#34;: {&#xA;&#x9;&#x9;&#34;kitty&#34;: &#34;10kitty&#34;,&#xA;&#x9;&#x9;&#34;librewolf&#34;: &#34;20librewolf&#34;,&#xA;&#x9;&#x9;&#34;firefox&#34;: &#34;21firefox&#34;,&#xA;&#x9;&#x9;&#34;chromium-browser&#34;: &#34;23chromium&#34;,&#xA;&#x9;&#x9;&#34;thunderbird-esr&#34;: &#34;30thunderbird&#34;,&#xA;&#x9;&#x9;&#34;dev.geopjr.Tuba&#34;: &#34;31tuba&#34;,&#xA;&#x9;&#x9;&#34;org.gnome.Fractal&#34;: &#34;32fractal&#34;,&#xA;&#x9;&#x9;&#34;signal&#34;: &#34;33signal&#34;,&#xA;&#x9;},&#xA;},&#xA;&#xA;Step 3: Style&#xA;&#xA;CSS is great because I understand it. The waybar and its modules can be customised easily.&#xA;&#xA;waybar style.css:&#xA;&#xA;custom-startmenu {&#xA;  font-size: 24px;&#xA;  background-position: 6px center;&#xA;  background-repeat: no-repeat;&#xA;  background-size: 38px;&#xA;  border-style: hidden;&#xA;  padding:6px 20px 4px 20px;&#xA;  border-radius:1rem;&#xA;  background-image: url(&#39;niri-icon2.svg&#39;);&#xA;  background-color: @accent;&#xA;  margin:0 0 0 4px;&#xA;  border-bottom: 2px solid transparent;&#xA;}&#xA;&#xA;custom-startmenu:hover {&#xA;  background-image: url(&#39;niri-icon0.svg&#39;);&#xA;}&#xA;&#xA;taskbar {&#xA;  margin:0;&#xA;}&#xA;&#xA;taskbar button {&#xA;  font-size: 24px;&#xA;  background-position: center center;&#xA;  background-repeat: no-repeat;&#xA;  background-size: 32px;&#xA;  border-style: hidden;&#xA;  padding:6px 8px 4px 8px;&#xA;  margin:0 0 0 12px;&#xA;  background-color: @themebasecolor;&#xA;  border-radius: 1rem;&#xA;  border-bottom: 2px solid transparent;&#xA;}&#xA;&#xA;taskbar button.active {&#xA;  border-bottom: 2px solid @accent;&#xA;}&#xA;&#xA;taskbar button:hover {&#xA;  border-bottom: 2px solid @accent;&#xA;}&#xA;&#xA;Step 4: Sorting icons&#xA;&#xA;Now it&#39;s getting dirty. Sorting / grouping by app-id has the disadvantage that waybar here goes bluntly by alphabet. But I would like to sort by the workspaces ... is not possible!&#xA;&#xA;So a little trick ... Rename the app-id with a numbering. I follow the assignment in config.kdl in niri. Terminal is always on workspace 1, browser on 2 and everything with communication on workspace 3. (See step 2).&#xA;&#xA;But now there is another problem. By renaming the app, the waybar can no longer find the icon.&#xA;&#xA;This means that .local/share/applications according .desktop files with the same name must be created.&#xA;&#xA;Example 10kitty.desktop:&#xA;&#xA;[Desktop Entry]&#xA;Version=1.0&#xA;Type=Application&#xA;Name=kitty&#xA;Icon=utilities-x-terminal&#xA;NoDisplay=true&#xA;&#xA;NoDisplay=true is important to not display it in dmenu (like rofi).&#xA;&#xA;#opensuse #niri #wayland]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="/posts/251201/dock01.png" alt=""></p>

<p>As a former mac user, I always liked the dock. Since I am now back at <a href="https://github.com/YaLTeR/niri">niri</a>, I wanted to have not only a statusbar (with waybar), but also a kind of dock again.</p>

<p>As I now had a lot of experience with customising the <a href="https://github.com/Alexays/Waybar">waybar</a>, it made sense to convert it into a kind of dock.</p>

<p>One quickly reaches the limitations of <a href="https://github.com/Alexays/Waybar">waybar</a>, but with 1-2 tricks I can be quite satisfied (at the moment).</p>

<h2 id="dotfiles">DotFiles:</h2>

<p>You can find the whole setup in my dotfiles on codeberg: <a href="https://codeberg.org/Nasendackel/dotfiles">https://codeberg.org/Nasendackel/dotfiles</a></p>

<h2 id="step-1-a-start-menu">Step 1: A “Start” Menu</h2>

<p><img src="/posts/251201/dock02.png" alt=""></p>

<p>You need to create a custom module that accesses an XML file. The commands are specified in the config of waybar and the XML provides the menu structure in GTK.</p>

<p><strong>waybar conf:</strong></p>

<pre><code>&#34;custom/startmenu&#34;: {
    &#34;format&#34; : &#34; &#34;,
    &#34;tooltip&#34;: false,
    &#34;menu&#34;: &#34;on-click&#34;,
    &#34;menu-file&#34;: &#34;~/.config/waybar/startmenu.xml&#34;,
    &#34;menu-actions&#34;: {
		&#34;about&#34;: &#34;~/.config/niri/bin/about.sh&#34;,
		&#34;info&#34;: &#34;resources&#34;,
        	&#34;shutdown&#34;: &#34;systemctl poweroff&#34;,
        	&#34;reboot&#34;: &#34;systemctl reboot&#34;,
		&#34;suspend&#34;: &#34;systemctl suspend&#34;,
		&#34;lock&#34;: &#34;swaylock -f&#34;,
    },
},
</code></pre>

<p><strong>startmenu.xml:</strong></p>

<pre><code>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;
&lt;interface&gt;
&lt;object class=&#34;GtkMenu&#34; id=&#34;menu&#34;&gt;
 	&lt;child&gt;
		&lt;object class=&#34;GtkMenuItem&#34; id=&#34;about&#34;&gt;
			&lt;property name=&#34;label&#34;&gt; About&lt;/property&gt;
    		&lt;/object&gt;
	&lt;/child&gt;
	&lt;child&gt;
		&lt;object class=&#34;GtkMenuItem&#34; id=&#34;info&#34;&gt;
			&lt;property name=&#34;label&#34;&gt; Ressources&lt;/property&gt;
    		&lt;/object&gt;
	&lt;/child&gt;
	&lt;child&gt;
      		&lt;object class=&#34;GtkSeparatorMenuItem&#34; id=&#34;delimiter1&#34;/&gt;
    	&lt;/child&gt;
    	&lt;child&gt;
		&lt;object class=&#34;GtkMenuItem&#34; id=&#34;lock&#34;&gt;
			&lt;property name=&#34;label&#34;&gt; Lock Screen&lt;/property&gt;
        	&lt;/object&gt;
	&lt;/child&gt;
	&lt;child&gt;
        	&lt;object class=&#34;GtkMenuItem&#34; id=&#34;suspend&#34;&gt;
			&lt;property name=&#34;label&#34;&gt; Suspend&lt;/property&gt;
        	&lt;/object&gt;
	&lt;/child&gt;
   	&lt;child&gt;
        	&lt;object class=&#34;GtkMenuItem&#34; id=&#34;reboot&#34;&gt;
			&lt;property name=&#34;label&#34;&gt;󰑓 Reboot&lt;/property&gt;
        	&lt;/object&gt;
    	&lt;/child&gt;
  	&lt;child&gt;
        	&lt;object class=&#34;GtkMenuItem&#34; id=&#34;shutdown&#34;&gt;
			&lt;property name=&#34;label&#34;&gt;  Shutdown&lt;/property&gt;
        	&lt;/object&gt;
	&lt;/child&gt;
&lt;/object&gt;
&lt;/interface&gt;
</code></pre>

<h2 id="step-2-taskbar-module">Step 2: Taskbar Module</h2>

<p>The taskbar module lists all open apps. Unfortunately, you can only create shortcuts or list open apps with the Waybar. A classic dock is not possible. However, since I have assigned all important apps to shortcuts, only the display of open apps is sufficient for me.</p>

<p>It is important to set ‘sort-by-app-id’ to true so that the apps are grouped and sorted accordingly (see Step 4).</p>

<p><strong>waybar conf:</strong></p>

<pre><code>&#34;wlr/taskbar&#34;: {
	&#34;format&#34;: &#34;{icon}&#34;,
	&#34;icon-theme&#34;: &#34;Papirus&#34;,
	&#34;icon-size&#34;: 32,
	&#34;on-click&#34;: &#34;minimize-raise&#34;,
	&#34;active-first&#34;: false,
	&#34;sort-by-app-id&#34;: true,
	&#34;app_ids-mapping&#34;: {
		&#34;kitty&#34;: &#34;10_kitty&#34;,
		&#34;librewolf&#34;: &#34;20_librewolf&#34;,
		&#34;firefox&#34;: &#34;21_firefox&#34;,
		&#34;chromium-browser&#34;: &#34;23_chromium&#34;,
		&#34;thunderbird-esr&#34;: &#34;30_thunderbird&#34;,
		&#34;dev.geopjr.Tuba&#34;: &#34;31_tuba&#34;,
		&#34;org.gnome.Fractal&#34;: &#34;32_fractal&#34;,
		&#34;signal&#34;: &#34;33_signal&#34;,
	},
},
</code></pre>

<h2 id="step-3-style">Step 3: Style</h2>

<p>CSS is great because I understand it. The waybar and its modules can be customised easily.</p>

<p><strong>waybar style.css:</strong></p>

<pre><code>#custom-startmenu {
  font-size: 24px;
  background-position: 6px center;
  background-repeat: no-repeat;
  background-size: 38px;
  border-style: hidden;
  padding:6px 20px 4px 20px;
  border-radius:1rem;
  background-image: url(&#39;niri-icon2.svg&#39;);
  background-color: @accent;
  margin:0 0 0 4px;
  border-bottom: 2px solid transparent;
}

#custom-startmenu:hover {
  background-image: url(&#39;niri-icon0.svg&#39;);
}

#taskbar {
  margin:0;
}

#taskbar button {
  font-size: 24px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 32px;
  border-style: hidden;
  padding:6px 8px 4px 8px;
  margin:0 0 0 12px;
  background-color: @theme_base_color;
  border-radius: 1rem;
  border-bottom: 2px solid transparent;
}

#taskbar button.active {
  border-bottom: 2px solid @accent;
}

#taskbar button:hover {
  border-bottom: 2px solid @accent;
}
</code></pre>

<h2 id="step-4-sorting-icons">Step 4: Sorting icons</h2>

<p>Now it&#39;s getting dirty. Sorting / grouping by app-id has the disadvantage that waybar here goes bluntly by alphabet. But I would like to sort by the workspaces ... is not possible!</p>

<p>So a little trick ... Rename the app-id with a numbering. I follow the assignment in config.kdl in niri. Terminal is always on workspace 1, browser on 2 and everything with communication on workspace 3. (See step 2).</p>

<p>But now there is another problem. By renaming the app, the waybar can no longer find the icon.</p>

<p>This means that <em>.local/share/applications</em> according <em>.desktop</em> files with the same name must be created.</p>

<p><strong>Example 10_kitty.desktop:</strong></p>

<pre><code>[Desktop Entry]
Version=1.0
Type=Application
Name=kitty
Icon=utilities-x-terminal
NoDisplay=true
</code></pre>

<p>NoDisplay=true is important to not display it in dmenu (like rofi).</p>

<p><a href="https://inlovewithlinux.com/tag:opensuse" class="hashtag"><span>#</span><span class="p-category">opensuse</span></a> <a href="https://inlovewithlinux.com/tag:niri" class="hashtag"><span>#</span><span class="p-category">niri</span></a> <a href="https://inlovewithlinux.com/tag:wayland" class="hashtag"><span>#</span><span class="p-category">wayland</span></a></p>
]]></content:encoded>
      <guid>https://inlovewithlinux.com/dock-in-waybar</guid>
      <pubDate>Mon, 01 Dec 2025 20:33:20 +0100</pubDate>
    </item>
  </channel>
</rss>