I use dummy script to toggle monitors (from archwiki)
#!/bin/sh
intern=eDP-1
extern=DP-1
if xrandr | grep "$extern disconnected"; then
xrandr --output "$extern" --off --output "$intern" --auto
else
xrandr --output "$intern" --off --output "$extern" --auto
fi
Hm, never used arandr but it's similar to XFCE utlity on the first sight.
You setup profile where one display is enabled, another disabled, name him "external" and active in arandr every time connecting to external monitor, correct?
So I played around arandr and resolved initial issue...but got another one (as always). I added script to my bspwmrc file:
So if i plug external monitor and reload bspwm (which also reloads polybar), it adds second pane to my polybar (1 2 3 4 5 1 2 3 4 5), but works.
Now smth interesting, when I unplug external monitor and then again reload bspwm, it switches to internal one but now cuts window for every application.