It looks like kanshi
fails because it tries to apply its config too quickly. The only thing that seems to work 80% of the time is this kludge:
~/.config/kanshi/config
profile alone {
exec /home/purism/.config/kanshi/on-alone
output DSI-1 enable scale 2
}
profile nexdock {
exec /home/purism/.config/kanshi/on-nexdock
output "Unknown NexDock 8R33926O00Q (DP-1)" enable
output DSI-1
}
~/.config/kanshi/on-alone
#!/usr/bin/env bash
/usr/bin/wlr-randr --output DSI-1 --on
exec pkill -f -- '--app-id nexdock'
~/.config/kanshi/on-nexdock
#!/usr/bin/env bash
/usr/bin/gnome-session-inhibit --inhibit suspend:idle --inhibit-only --app-id nexdock --reason 'Nexdock session' &
sleep 3
exec /usr/bin/wlr-randr --output DSI-1 --off
So I’m basically just using wlr-randr
instead of kanshi
now: I only need it so I don’t have to write udev
rules myself