<!DOCTYPE html>
<html lang="" xml:lang="" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<meta content="pandoc" name="generator"/>
<meta content="width=device-width, initial-scale=1.0, user-scalable=yes" name="viewport"/>
<title>-</title>
</head>
<body>
<p style="padding: 0 0.5em">Hi Jan,</p>
<p class="quotelead" style="padding: 0 0.5em; margin-bottom: -1em; font-size: 80%">On Mon, Mar 11, 2024 at 05:44:56PM +0000, Jan Detke
wrote:</p>
<blockquote class="quote initial" style="padding: 0 0.5em; margin: 0; font-style: italic; border-left: 2px solid #666; color: #666; font-size: 80%">
<p style="padding: 0 0.5em">[…]<br/>
When I plug my laptop into the docking station my rescreenHook gets
executed which invokes autorandr to load my specified profiles, which -
when docked - applies the rules for my docked configuration shown above.
Xmobar spawns on monitor with ID 1 and indicates, that there is also a
second monitor displaying a different workspace but somehow there is no
xmobar present on the other monitor (ID 0). When I run the command
defined in my barSpawner for monitor ID 0, the xmobar is spawned and
works perfectly fine.</p>
</blockquote>
<p style="padding: 0 0.5em">The X.H.StatusBar machinery does not normally restart bars that are
already running. It leaves it up to xmobar itself to notice xrandr
layout changes and to reposition themselves. That usually works fine but
yeah I got to admit I've seen xmobar fail to reposition itself. I think
I even spent some time trying to fix that but concluded it's some weird
race condition in the X server or Xlib itself that's preventing it from
seeing the correct layout info.</p>
<p style="padding: 0 0.5em">Anyway, you can try to add <a href="https://xmonad.github.io/xmonad-docs/xmonad-contrib/XMonad-Hooks-StatusBar.html#v:killAllStatusBars">killAllStatusBars</a>
to your <code style="white-space: pre-wrap">afterRescreenHook</code>, and that should cause all bars
to be restarted.</p>
<div class="signature" style="color: #999; font-family: monospace; white-space: pre; margin: 1em 0 0 0; font-size: 80%"><span class="leader">-- </span><br/>
<pre style="line-height: 125%; padding: 0 1em"><code style="white-space: pre-wrap">Tomáš "liskin" ("Pivník") Janoušek, https://lisk.in/
</code></pre>
</div>
</body>
</html>