Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sway re-applies transforms on each config reload #5236

Closed
icefoxen opened this issue Apr 19, 2020 · 4 comments
Closed

Sway re-applies transforms on each config reload #5236

icefoxen opened this issue Apr 19, 2020 · 4 comments

Comments

@icefoxen
Copy link

icefoxen commented Apr 19, 2020

  • Sway Version: sway version 1.4
  • Debug log: http://paste.debian.net/1141361/
  • Configuration File: Default config file, with the following additions for 3-monitor setup:
output DP-1 resolution 1920x1080 position 0 0 transform 90 clockwise
output DVI-D-1 resolution 1920x1080 position 1080 300
output DP-3 resolution 1920x1080 position 3000 0 transform 90 anticlockwise
  • Summary

Trying to configure a 3-monitor setup, with the two outside monitors rotated 90 degrees like so:

+----+            +-----+
|    | +--------+ |     |
|    | |        | |     |
|    | +--------+ |     |
+----+            +-----+

With the above configuration it works, but the transform rotations get re-applied every time the sway config file is reloaded. So upon starting sway everything is correct. Upon reloading the config with Mod4+Shift+c it rotates the outer two monitors again, so that "up" on each is facing inwards. Reload again and they're upside-down, reload again and "up" is facing outwards, and reload again and everything faces upwards again. So, it seems like the transform state isn't getting reset properly when the file is reloaded. This isn't really a critical problem, but it does make playing with a sway config file a bit tedious, not to mention surreal.

Thank you!

@icefoxen icefoxen changed the title Sway applies transforms on each config reload Sway re-applies transforms on each config reload Apr 19, 2020
@progandy
Copy link
Contributor

Do not use an incremental transform in your configuration file, but a fixed value.
90 and 270 instead of 90 (anti)clockwise.

@emersion
Copy link
Member

I know it's confusing, but clockwise means "add the transform to the current value". Maybe we should make it an error to use it from the config file.

@icefoxen
Copy link
Author

Thanks, at least it's an easy thing to fix. What is clockwise and anticlockwise for then anyway, if not for use from a config file?

@Emantor
Copy link
Contributor

Emantor commented Apr 20, 2020

It's to be used via swaymsg where it will rotate the display clockwise or anticlockwise. Since swaymsg is for interactive use, it makes sense there.

emersion added a commit to emersion/sway that referenced this issue Apr 20, 2020
Prevent them from being used in the config file.

This is a breaking config file change.

References: swaywm#5236
ddevault pushed a commit that referenced this issue Apr 21, 2020
Prevent them from being used in the config file.

This is a breaking config file change.

References: #5236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants