fakexrandr icon indicating copy to clipboard operation
fakexrandr copied to clipboard

Set primary display

Open yoshegg opened this issue 6 years ago • 6 comments

I know that there were some discussions about this topic, but are there any news?

I'm using a Matrox TripleHead2Go and Ubuntu with Gnome, unfortunately the main display will always be the leftmost.

I also tried to just leave out fakexrandr and only use xrandr and its --setmonitor option, but without success (cf. issue #48)

yoshegg avatar May 15 '18 19:05 yoshegg

No, there's no news. You'd need to hook XRRGetOutputPrimary to do this (Example of how the call is used and what applications expect to receive in return), which should be straightforward. The main question is how to configure this (in the GUI and how to store the information in the config file). I won't find time for this any time soon, but feel free to open a PR.

phillipberndt avatar May 15 '18 19:05 phillipberndt

Thank you for your explanation. Unfortunately I don't know much about any of the involved stuff to make display settings work. And I don't know C.

I was wondering: Where does fakexrandr define what display the primary one is? Or is this just something xrandr guesses?

yoshegg avatar May 15 '18 20:05 yoshegg

It doesn't define it at all, that's the issue :) To define it you'd have to implement the call mentioned above and return one of the fake outputs.

phillipberndt avatar May 15 '18 20:05 phillipberndt

Damn :( I'll try my best then.

yoshegg avatar May 15 '18 21:05 yoshegg

Well I actually did it. :muscle:

I forked this repo and added a new branch called matrox. It can be found here. I'm not sure if it's worthy to be added to the main repository, but in case someone needs this in the future, here it is.

It's a dirty hack, but it does what I need.

yoshegg avatar May 16 '18 17:05 yoshegg

Cool, congrats 👍 The first version of fakexrandr was exactly such a hack, with hardcoded splits, so no worries.. let's leave this open, maybe someone will step up to make this configurable as well, and then we can include the change!

phillipberndt avatar May 16 '18 19:05 phillipberndt