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

i3move: margin not respected & problems with large windows #3

Open
laur89 opened this issue Feb 21, 2023 · 7 comments
Open

i3move: margin not respected & problems with large windows #3

laur89 opened this issue Feb 21, 2023 · 7 comments

Comments

@laur89
Copy link

laur89 commented Feb 21, 2023

This is report of two issues. Please refer to attached video of reproduction.
Note the video is of two screens side-by-side; left is smaller, right a larger one.

  1. top margin not respected
    Note how the window will cover the polybar in top, but leave a gap at the bottom. Do I misunderstand top & bottom margins, or is it an issue?

  2. if window is a considerable fraction of a screen size, then i3move will sometimes have problems moving it around. This occurs in the video after galculator window size is increased, on the smaller screen (left). Note after some moving around the problem is fixed.

~/.config/i3move:

--title 18
--border 2
--margins 20 1 1 1
--inside-distance w
--outside-distance -9px
--small-distance =
--large-distance 3
--threshold 33%%
--no-clamp
--snap
--hide
--compound-display
--passthru
i3move-bugreport.webm
@DMBuce
Copy link
Owner

DMBuce commented Feb 21, 2023

RE: point 1, yes that is an issue. With your config, I would expect the window to snap to the bottom edge of the bar when moving upward, and 1px from the edge of the other sides of the screen. If that makes sense.

It's strange how the window snaps past polybar at the top but then leaves a gap at the bottom. It's almost like it's interpreting the top margin as the bottom one and vice versa.

I just tried your config and it worked as expected. So I'm not sure how best to isolate the issue and figure out what's going wrong. But when I have more time, I'll try using a setup more like yours, with polybar and my smaller screen on the left.

Are you using the most recent version of i3move from github? Or from AUR (if so, which package)?

What version of i3 are you using?

Can you show your i3move keybinds? Also I noticed Super+I in the video, what is that bound to? Looks like it's changing focus between monitors?

Can you also send the output of xrandr -q --screen 0?

@laur89
Copy link
Author

laur89 commented Feb 22, 2023

Am using latest i3move from github, ie https://github.com/DMBuce/i3b/blob/23c09740e8a9c81419bef886b677ea2b6af2585e/bin/i3move

I'll try using a setup more like yours, with polybar and my smaller screen on the left

Note both issues also reproduce at work where the smaller screen is below the larger one.

What version of i3 are you using?

i3 version 4.22-non-git � 2009 Michael Stapelberg and contributors

built from i3/i3 a5da4d54f315e830e2a901b8e75ae7e478401c6e

Also I noticed Super+I

That was likely a typo, shouldn't have anything bound to it. Relevant i3move binds are:

set $mod Mod4
bindsym $mod+Shift+h exec --no-startup-id i3move --clamp left
bindsym $mod+Shift+j exec --no-startup-id i3move --clamp down
bindsym $mod+Shift+k exec --no-startup-id i3move --clamp up
bindsym $mod+Shift+l exec --no-startup-id i3move --clamp right

Can you also send the output of xrandr -q --screen 0?

$ xrandr -q --screen 0
Screen 0: minimum 320 x 200, current 5920 x 2560, maximum 16384 x 16384
eDP connected 1920x1080+0+515 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080     60.03*+
   1680x1050     60.03  
   1280x1024     60.03  
   1440x900      60.03  
   1280x800      60.03  
   1280x720      60.03  
   1024x768      60.03  
   800x600       60.03  
   640x480       60.03  
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
DisplayPort-3 disconnected (normal left inverted right x axis y axis)
DisplayPort-4 connected primary 2560x1440+1920+515 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95 +  74.92* 
   2560x1080     59.98  
   2048x1152     60.00  
   1920x1200     59.88  
   1920x1080     60.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x800      59.81  
   1152x864      75.00  
   1280x768      59.87  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DisplayPort-5 connected 1440x2560+4480+0 right (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95 +  74.92* 
   2560x1080     59.98  
   2048x1152     60.00  
   1920x1200     59.88  
   1920x1080     60.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x800      59.81  
   1152x864      75.00  
   1280x768      59.87  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08

Note there's a third screen that was excluded from the recording -- vertical one to the very right. But as mentioned, it also reproduces with 2 screens, including when smaller one is placed below the larger one.

@laur89
Copy link
Author

laur89 commented Feb 22, 2023

Here's reproduction with the other setup - smaller screen below larger one.

layout as shown by arandr:
2023-02-22_16:20:34

Note it's briefly OK if the window is dragged (manually/with a mouse) to the middle of smaller screen.

i3move-repro2.webm
$ xrandr -q --screen 0
Screen 0: minimum 320 x 200, current 3840 x 3240, maximum 16384 x 16384
eDP connected primary 1920x1080+907+2160 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080     60.03*+
   1680x1050     60.03  
   1280x1024     60.03  
   1440x900      60.03  
   1280x800      60.03  
   1280x720      60.03  
   1024x768      60.03  
   800x600       60.03  
   640x480       60.03  
HDMI-A-0 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 621mm x 341mm
   3840x2160     30.00*+  30.00    25.00    24.00    29.97    23.98  
   2560x1600     59.97  
   2560x1440     59.95  
   1920x1200     30.00  
   1920x1080     60.00    50.00    59.94    30.00    24.00    29.97    23.98  
   1600x1200     30.00  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      30.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1440x576      50.00  
   1024x768      75.03    70.07    60.00  
   1440x480      60.00    59.94  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
DisplayPort-3 disconnected (normal left inverted right x axis y axis)
DisplayPort-4 disconnected (normal left inverted right x axis y axis)
DisplayPort-5 disconnected (normal left inverted right x axis y axis)

@laur89
Copy link
Author

laur89 commented Aug 15, 2023

@DMBuce any chance you'll be able to take a look at this?

@DMBuce
Copy link
Owner

DMBuce commented Aug 15, 2023

Sorry, I looked into it a while back and never followed up. Back then I tried upgrading i3:

[2023-02-22T13:08:02-0600] [ALPM] upgraded i3-wm (4.20.1-2 -> 4.22-3)

After updating i3 and trying a few different monitor setups, I wasn't able to reproduce the issue. Putting my smaller monitor on the left/right/above/below my larger one didn't seem to make any difference.

Your xrandr output looked ok to me, but just for shiggles I also tried copying it to a file, adjusting the relevant lines with my own monitor's dimensions, and modifying i3move to read from the file instead of xrandr. But the script still behaved as expected for me.

Since I'm not able to reproduce the issue, I'm not sure how to troubleshoot it.

@laur89
Copy link
Author

laur89 commented Aug 15, 2023

To be clear, none of the two observations reproduced on your end?

@DMBuce
Copy link
Owner

DMBuce commented Aug 15, 2023

Right, I did not experience either issue.

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