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

Enable per-monitor copy settings #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chaserhkj
Copy link

This PR enables -c flag, which will allow user to specify per-monitor display copying.

Copy link
Owner

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, works.

Please add new option to:

  • README.md
  • .xlayoutdisplay

int xpos = 0;
int ypos = 0;
for (const auto &output : outputs) {

if (output->desiredActive) {
if (output->desiredActive && copies.find(output->name) == copies.end()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to test whether the destination (and source) exists. xlayoutdisplay --copy HDMI1:aoeu results in HDMI1 being disabled.

A good place might be after discoverOutputs, with an error/exit message like "copy src HDMI2222 not found"

@@ -57,6 +57,7 @@ void usage(std::ostream &os) {
"-r [ --rate ] arg Refresh rate override\n"
"-m [ --mirror ] mirror outputs using the lowest common resolution\n"
"-o [ --order ] arg order of outputs, repeat as needed\n"
"-c [ --copy ] arg arg in format dst:src, copy from output src to output dst, repeat as needed\n"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps "copy resolution, refresh and position using format dst:src, repeat as needed"


if (output->desiredActive && target->desiredActive) {

// find supported mode of output that has same size of target
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the fallback to highest available.

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

Successfully merging this pull request may close these issues.

2 participants