kanshi: Fix transform change between vertical and normal docked mode

Since I have two configurations for my dual-screen desktop setup, with
one having the two screens side-by-side and the other having the left
screen vertically rotated 90 degrees, I need two different kanshi
setups.

The vertical setup is called 'dockedvert' and is the default when the
two screens are detected. The horizontal setup is only called 'docked'
and can be switched to manually. Before, it would not correctly revert
the left screen from its vertical 90 degree rotation when going from the
vertical setup to the horizontal one.

So I applied the `transform` output directive but kanshi refused to
start. That is because to revert the transform into the default
horizontal position you do not use `0` but `normal` as the value.
With this fix everything works as expected.
This commit is contained in:
Marty Oehme 2025-09-27 11:08:11 +02:00
parent 7289522380
commit 6106cfcbde
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -3,15 +3,21 @@ output "LG Electronics W2442 0x000574E1" alias $left-screen
output "LG Electronics W2442 0x000574FD" alias $right-screen
profile dockedvert {
output $left-screen position 0,0 transform 90
output $left-screen {
position 0,0
transform 90
}
output $right-screen position 1080,0
output eDP-1 disable
exec notify-send "💻 Display changed" "Applying vertical docked LG profile"
}
profile docked {
output $left-screen position 0,0 transform 0
output $right-screen position 1920,0 transform 0
output $left-screen {
position 0,0
transform normal
}
output $right-screen position 1920,0
output eDP-1 disable
exec notify-send "💻 Display changed" "Applying docked LG profile"
}