way-displays icon indicating copy to clipboard operation
way-displays copied to clipboard

Feature: transform the display

Open anandubey opened this issue 2 years ago • 4 comments

I am using this on river window manager, Do I need to use kanshi on top of way-display to rotate the diplay or is there any option that I cannot seem to find?

anandubey avatar May 03 '22 11:05 anandubey

way-displays cannot rotate displays itself, although it does work when displays are rotated. Adding this as a feature request.

Currently you can rotate using sway via its config e.g. output DP-2 transform 90, however it appears that river cannot do that.

Thanks for letting me know about river; I can investigate and ensure that way-displays is well behaved under it.

alex-courtis avatar May 04 '22 22:05 alex-courtis

Sorry for the late reply was busy in some work! I am daily driving river and I know a bit of C. I am trying to get a grasp of the source code, to see if I can implement this feature. If you can point me in the right direction I can start tweaking in my system.

EDIT: Forgot to say, Thank you for making this tool, It is handling my dual displays flawlessly.

anandubey avatar May 11 '22 11:05 anandubey

River works well. I've added some "blessing" on both projects.

If you can point me in the right direction I can start tweaking in my system.

I'd be really grateful: fork, build and PR please.

Needed:

  • Add transform to Head via the listener. There is an enum defined in wayland for it: 8 possible values.
  • Apply transform in the same manner as position/scale
  • Add to cfg.yaml
  • Add to CLI: get, set, del
  • Add the (non-default) transform to the head and cfg printing
  • Document via README and man

alex-courtis avatar May 11 '22 22:05 alex-courtis

Dev ideas:

  • If you have a second machine e.g. laptop, test using that. You'll see a .copy job in GNUmakefile.dev that copies way-displays to my laptop after building; you can adapt that and use it via make -f GNUmakefile.dev
  • Alternatively, you could you a different virtual terminal for your testing e.g. ctrl-alt-F3
  • You can sometimes "cheat" to get an extra monitor to test with: plug an output into a spare input on the monitor, but don't show that input. wayland will still see that monitor and happily use it.

If you can, please:

  • make -f GNUmakefile.dev cppcheck
  • make -f GNUmakefile -k iwyu
  • valgrind
    • run with valgrind --leak-check=full --show-leak-kinds=all --suppressions=/tmp/vg.supp --gen-suppressions=all way-displays
    • apply settings, plug monitors etc
    • ctrl-c

alex-courtis avatar May 11 '22 23:05 alex-courtis