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

How to configure rotation / transformation #97

Closed
andypiper opened this issue Aug 24, 2024 · 14 comments
Closed

How to configure rotation / transformation #97

andypiper opened this issue Aug 24, 2024 · 14 comments
Labels
enhancement New feature or request

Comments

@andypiper
Copy link

I'm trying out wlmaker on the MNT Pocket Reform.

It installs and starts just fine - but - the display on the Pocket Reform needs to be rotated by 90 or 270 degrees. Is it possible to change the display orientation (and ideally, scale) in the config file?

@andypiper
Copy link
Author

For clarity, this works fine when I run in a window under another compositor with rotation already applied, but from going through the code I cannot see that there is an existing configuration option that would allow wlmaker to be the root compositor and have a transformation applied on the display. I think there may be support for a scale already but don't see it documented.

@phkaeser phkaeser added enhancement New feature or request good first issue Good for newcomers labels Aug 26, 2024
@phkaeser
Copy link
Owner

phkaeser commented Aug 26, 2024

Hej Andy! Happy to hear you've been able to install and run it successfully! (although not rotated correctly).

Unfortunately, wlmaker does currently not (yet) support output transformations.

A quick read of wlroots suggests that 90-degree rotations on the (default) output should only be one function call (wlr_output_set_transform); plus some wiring-up of a corresponding configuration setting. (hence declaring it a "good firs issue" for any contributor).

I was aiming to work on multi-output support for v0.5; but may try to add this next.
(note: I'm on vacation for a few weeks, so don't hold your breath... :) )

@phkaeser
Copy link
Owner

Started looking into this at https://github.com/phkaeser/wlmaker/tree/output-transform.

Finding so far:

  • The actual output transformation is rather easy to do indeed, already included in above branch.
  • Neat finding: output also permits scaling, which would be another way to help with Easy scaling for decorations, including icons #99.
  • But, mapping the pointer coordinates properly doesn't come as easily: There is a mismatch.

Will need more thinking.

@phkaeser phkaeser removed the good first issue Good for newcomers label Aug 28, 2024
@phkaeser
Copy link
Owner

Hhhmm... actually, noticing that the pointer coordinate mapping works correctly when running it on a virtual terminal; it "just" failes when running in window mode.

@phkaeser
Copy link
Owner

@andypiper -- I'd be curious if you could give it a try. It'll need compiling from head (that is: at #104), and to set Transformation to a suitable value, eg. to Rotate90 in https://github.com/phkaeser/wlmaker/blob/main/etc/wlmaker.plist and use --config_file=... accordingly.

@andypiper
Copy link
Author

andypiper commented Aug 30, 2024

So I have it compiled. I uninstalled wlmaker from Debian unstable, and followed the BUILD and RUN docs.

I am pretty sure that my config file is being read - I changed the terminal that gets started by default from foot to alacritty so I believe this is picking the config file I give it. If I modify Scale, this works when I run wlmaker in a window. However, Rotate90 or Rotate270 are not doing anything, either in a window, or if I run wlmaker in place of sway as my default compositor. I do not see anything in the DEBUG level of logging to show that this is either being picked up from the config file, or that there is an attempt to apply it.

One other strange (?) thing, if I copy the .plist file to $HOME/.wlmaker.plist and just try starting it, then wlmaker fails to start with a file not found error.

@phkaeser
Copy link
Owner

Oops, embarrassing: Added with #104, but accidentally merged the actual "set_transform" away in #105. Fixing that (and adding INFO log for what it applies) in #108 . My apologies!
Can you pull head and try once more?

The config file issue is unexpected => #109 for that.

@andypiper
Copy link
Author

I hoped to provide a fast follow-up here... but I've been stymied, potentially by Debian unstable changes. I'm getting a linker error related to an AMD API (!) from libgallium, and mesa-libgallium was updated late yesterday... attempting to pull it out now results in a stack of libgl* dependency issues. I dug fairly far here and even went so far as blasting the local dependencies for wlmaker and starting over; and, trying a second clean install of the OS on the Pocket Reform and going from there, but that just wanted to install the same package.

tl;dr I haven't been able to rebuild and re-test yet, but I'm still interested, and hopefully I've contributed a couple of useful bug reports in the meantime 🙂 will try again when I can.

@ideasman42
Copy link

Testing wlmaker and got it running.

From attempting to setup multiple vertical monitors, it looks like the Output option currently assumes a single monitor.
Could this be configurable by output name?

@phkaeser
Copy link
Owner

@ideasman42 -- the code is currently not built to handle multiple outputs.

Question to you: Are you looking for...

  1. A way to specify one Output for wlmaker to use (but OK to display on a single monitor only), or
  2. multi-output support, ie. the workspace spanning across multiple screens?

The former may be doable with limited effort; the latter will be a major update, though.

@ideasman42
Copy link

ideasman42 commented Sep 25, 2024

@ideasman42 -- the code is currently not built to handle multiple outputs.

Question to you: Are you looking for...

1. A way to specify one Output for wlmaker to use (but OK to display on a single monitor only), or

2. multi-output support, ie. the workspace spanning across multiple screens?

The former may be doable with limited effort; the latter will be a major update, though.

@phkaeser the latter, or as an alternative, support for a 3rd party application such as wlr-randr to configure the outputs.

@phkaeser
Copy link
Owner

Thanks for clarifying, @ideasman42 . That will be a larger effort; forking into #122 for tracking.

@andypiper
Copy link
Author

Iḿ back, with good news - we are in action on the MNT Pocket Reform now. I have ~/.wlmaker.plist configured with

Output = {
  Transformation = Rotate90;
  Scale = 1.5;
};

Thanks for supporting this feature!

@phkaeser
Copy link
Owner

phkaeser commented Oct 6, 2024

Glad to hear it now works for you! Thanks for verifying & reporting back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants