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

mons -a; problem going from 4:3 external to 16:9 internal #28

Open
mxmilkiib opened this issue Aug 16, 2018 · 3 comments
Open

mons -a; problem going from 4:3 external to 16:9 internal #28

mxmilkiib opened this issue Aug 16, 2018 · 3 comments

Comments

@mxmilkiib
Copy link

mxmilkiib commented Aug 16, 2018

I have mons -a in my .xinitrc, and an i3 hotkey to trigger mons -s after I've plugged my external in.

On unplugging the external, I get a situation where all windows on my laptop screen are restricted in width, until I run mons -o, which resolves the problem.

(In real life, I cannot see the bottom gap featured in the screenshot below, as it lies below the size of my laptop monitor.)

rose_2018-08-14-01 56 54

@Ventto
Copy link
Owner

Ventto commented Oct 1, 2018

Hello @milkmiruku,
Thanks for your feedback.

It could have a link with that issue (#27) for which It just made a fix (b421c31).
The DPI value was set to 96 by default without using option. For those who has a greater value on their desktop, it could lead to undefined graphical behaviors.

@mxmilkiib
Copy link
Author

Thanks, but no change when trying with master.

Aside: I was getting a ./mons.sh: line 278: : command not found, so I moved line 286 to 266 and the error went away, but with no difference to the side-of-the-screen-cut-off behaviour after unplugging.

@Ventto
Copy link
Owner

Ventto commented Oct 13, 2018

./mons.sh: line 278: : command not found: Fixed in 261ecbc

Is the second monitor "VIRTUAL1" ?

If yes, regarding your screenshot, the "VIRTUAL1" monitor has the "disconnected" status but it appears to be still plugged-in. Usually when a physical monitor is not plugged-in its status is automatically set "disconnected". The plugged-in monitor detection of mons is based on this rule. Here are the lines that handle the detection:

288:    xrandr_out="$("$XRANDR")"
289:	 enabled_out="$(echo "$xrandr_out" | grep 'connect')"
...
294:    enabled_out="$(echo "$enabled_out" | grep ' connect')"
295:    [ -z "$enabled_out" ] && { echo 'No plugged-in monitor detected.'; exit 1; }
296:    plug_mons="$(echo "$enabled_out" | cut -d' ' -f1)"

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

No branches or pull requests

2 participants