hyprland-community / pyprland

Scratchpads & many goodies for Hyprland [maintainer=@fdev31]
MIT License
345 stars 15 forks source link

[BUG] [layout_center] incorrect window position #135

Open tito opened 4 weeks ago

tito commented 4 weeks ago

Pyprland version 2.4.0

Describe the bug In a setup with 2 monitors, each monitor have its hyprland workspace. If you do pypr layout_center toggle, the current selected window will be split between both monitors AKA between both workspace.

Setup is: 1080p left, 2160p right

Before activation WhatsApp Image 2024-08-14 at 08 30 43 (1)

After activation WhatsApp Image 2024-08-14 at 08 30 43

Expected behavior It should be centered to the current workspace.

fdev31 commented 4 weeks ago

Hi! Can you provide the pypr logs and the output of hyprctl -j monitors ?

fdev31 commented 3 weeks ago

Do you have any special configuration ? And which version of Hyprland are you using?

fdev31 commented 3 weeks ago

Multiple monitors are supported, I'll rename to a more vague title until we get more clarity on your problem.

fdev31 commented 3 weeks ago

Lastly, do you have a chance to test on an older Hyprland version?

tito commented 3 weeks ago

Here is the output of hyprctl -j monitors:

❯ hyprctl -j monitors
[{
    "id": 0,
    "name": "DP-2",
    "description": "Acer Technologies Acer XB281HK #ASMTlagXJiXd",
    "make": "Acer Technologies",
    "model": "Acer XB281HK",
    "serial": "#ASMTlagXJiXd",
    "width": 3840,
    "height": 2160,
    "refreshRate": 59.99700,
    "x": 1920,
    "y": 0,
    "activeWorkspace": {
        "id": 8,
        "name": "8"
    },
    "specialWorkspace": {
        "id": 0,
        "name": ""
    },
    "reserved": [0, 49, 0, 0],
    "scale": 1.50,
    "transform": 0,
    "focused": true,
    "dpmsStatus": true,
    "vrr": false,
    "activelyTearing": false,
    "disabled": false,
    "currentFormat": "XRGB8888",
    "availableModes": ["3840x2160@60.00Hz","3840x2160@29.98Hz","3840x2160@24.00Hz","1920x1200@60.00Hz","1920x1080@60.00Hz","1600x1200@60.00Hz","1680x1050@60.00Hz","1280x1024@60.00Hz","1440x900@60.00Hz","1280x800@60.00Hz","1280x720@60.00Hz","1024x768@60.00Hz","800x600@60.32Hz","640x480@60.00Hz","640x480@59.94Hz"]
},{
    "id": 1,
    "name": "HDMI-A-2",
    "description": "Iiyama North America PLT2252 1151301100379",
    "make": "Iiyama North America",
    "model": "PLT2252",
    "serial": "1151301100379",
    "width": 1920,
    "height": 1080,
    "refreshRate": 60.00000,
    "x": 0,
    "y": 0,
    "activeWorkspace": {
        "id": 1,
        "name": "1"
    },
    "specialWorkspace": {
        "id": 0,
        "name": ""
    },
    "reserved": [0, 49, 0, 0],
    "scale": 1.00,
    "transform": 0,
    "focused": false,
    "dpmsStatus": true,
    "vrr": false,
    "activelyTearing": false,
    "disabled": false,
    "currentFormat": "XRGB8888",
    "availableModes": ["1920x1080@60.00Hz","1920x1080@60.00Hz","1920x1080@59.94Hz","1920x1080@50.00Hz","1920x1080@50.00Hz","1600x1200@60.00Hz","1680x1050@59.88Hz","1280x1024@75.03Hz","1280x1024@60.02Hz","1440x900@74.98Hz","1440x900@59.90Hz","1280x960@60.00Hz","1280x800@60.00Hz","1152x864@75.00Hz","1280x720@60.00Hz","1280x720@59.94Hz","1280x720@50.00Hz","1280x720@50.00Hz","1024x768@75.03Hz","1024x768@70.07Hz","1024x768@60.00Hz","832x624@74.55Hz","800x600@75.00Hz","800x600@72.19Hz","800x600@60.32Hz","800x600@56.25Hz","720x576@50.00Hz","720x576@50.00Hz","720x576@50.00Hz","720x480@60.00Hz","720x480@60.00Hz","720x480@59.94Hz","720x480@59.94Hz","640x480@75.00Hz","640x480@72.81Hz","640x480@66.67Hz","640x480@60.00Hz","640x480@59.94Hz","640x480@59.94Hz","720x400@70.08Hz"]
}]

Hyprland version:

❯ hyprctl version
Hyprland, built from branch  at commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259  (props: bump version to 0.42.0).
Date: Wed Aug 7 19:17:10 2024
Tag: v0.42.0, commits: 5069

I discovered the plugin spending time upgrading on latest version. I'm using arch and it's unclear how i can go back in time with packages.

fdev31 commented 3 weeks ago

Thank you! I guess this has to do with the scaling ratio applied to one of your monitors, I have busy times lately but I'll try to look into that!

fdev31 commented 3 weeks ago

I discovered the plugin spending time upgrading on latest version. I'm using arch and it's unclear how i can go back in time with packages.

Find the packages via https://archive.archlinux.org/ and just use pacman -U to install them.