ianyh / Amethyst

Automatic tiling window manager for macOS à la xmonad.
https://ianyh.com/amethyst/
MIT License
14.79k stars 488 forks source link

Windows move to other monitor when changing layouts or adding new windows #1342

Open bendalton opened 1 year ago

bendalton commented 1 year ago

Describe the bug When changing around layouts and/or moving around windows, frequently windows will be moved to a second monitor. After this, window sizes and layouts become unpredictable until I either restart amethyst or, sometimes, move things around and toggle between some other layouts.

It happened more frequently when one of my monitors was vertically oriented but it still occurs sometimes and I haven't been able to determine the cause. This happens in different layouts and is not constrained to a single layout.

Applications: Anything.

To Reproduce

(This is not consistent and I haven't been able to intentionally trigger the behavior, only when I'm working and trying to move windows around for productivity does it seem to happen. But, I was able to follow something like these steps to make it happen as I was writing this.)

  1. On my dual monitor setup, add 5 windows to a screen using something like Wide Tall
  2. Use the shortcut to cycle through layouts
  3. Eventually one of the windows will shift to the other screen.
  4. After this, it seems like moving windows within a layout or changing layouts will keep shifting windows to the other monitor.

Expected behavior Changing layouts simply resizes windows and never moves them to a second monitor.

Screenshots

This is an example of what it looks like AFTER things become unstable. Both of these monitors are on "Widescreen Tall"

CleanShot 2022-11-18 at 09 34 18@2x

CleanShot 2022-11-18 at 09 34 14

Versions:

Debug Info

Version: 0.16.0 (94)

OS version: Version 12.6 (Build 21G115)

Screens:
    (0.0, 0.0, 2560.0, 1440.0) [(0.0, 0.0, 2560.0, 1440.0)]
    (0.0, 1440.0, 2560.0, 1440.0) [(0.0, -1440.0, 2560.0, 1440.0)]

Configuration:
use-canary-build: 1
window-resize-step: 5
floating: (
        {
        id = "com.tinyspeck.slackmacgap";
        "window-titles" =         (
        );
    },
        {
        id = "com.readdle.smartemail-Mac";
        "window-titles" =         (
            ""
        );
    },
        {
        id = "com.microsoft.VSCode";
        "window-titles" =         (
        );
    },
        {
        id = "com.google.Chrome";
        "window-titles" =         (
        );
    },
        {
        id = "com.flexibits.fantastical2.mac";
        "window-titles" =         (
        );
    },
        {
        id = "com.google.Chrome.canary";
        "window-titles" =         (
        );
    },
        {
        id = "com.google.Chrome.canary";
        "window-titles" =         (
        );
    },
        {
        id = "com.readdle.SparkDesktop";
        "window-titles" =         (
        );
    }
)
screen-padding-left: 0
mouse-resizes-windows: 1
enables-layout-hud-on-space-change: 0
mouse-follows-focus: 0
floating-is-blacklist: 0
screen-padding-right: 0
float-small-windows: 1
restore-layouts-on-launch: 1
ignore-menu-bar: 0
focus-follows-mouse: 0
enables-layout-hud: 1
layouts: (
    tall,
    wide,
    fullscreen,
    column,
    "3column-left",
    "middle-wide",
    "3column-right",
    "widescreen-tall-right",
    "widescreen-tall",
    bsp,
    row,
    bsp
)
window-minimum-height: 0
smart-window-margins: 1
screen-padding-bottom: 0
window-margins: 1
follow-space-thrown-windows: 1
screen-padding-top: 0
new-windows-to-main: 1
debug-layout-info: 1
mod2: (
    option,
    shift,
    control
)
mod1: (
    option,
    shift
)
window-margin-size: 5
mouse-swaps-windows: 1
window-minimum-width: 0

Manageable applications:
    App Store (com.apple.AppStore)
    Slack (com.tinyspeck.slackmacgap)
    Google Chrome Canary (com.google.Chrome.canary)
    talagent (com.apple.talagent)
    Notes (com.apple.Notes)
    zoom.us (us.zoom.xos)
    Tower (com.fournova.Tower3)
    Messages (com.apple.MobileSMS)
    Brother HL-L2340D series (com.apple.print.PrinterProxy)
    Things (com.culturedcode.ThingsMac)
    Activity Monitor (com.apple.ActivityMonitor)
    Fantastical (com.flexibits.fantastical2.mac)
    Robo 3T (com.3tsoftwarelabs.robo3t)
    Preview (com.apple.Preview)
    iTerm2 (com.googlecode.iterm2)
    Kaleidoscope (app.kaleidoscope.v3)
    Spotify (com.spotify.client)
    Finder (com.apple.finder)
    Postman Agent (com.postmanlabs.agent.mac)
    NodeRed (com.fluidapp.FluidApp2.NodeRed)
    Red Sweater Crash Reporter (com.red-sweater.crashreporter)
    Spark Desktop (com.readdle.SparkDesktop)
    Code (com.microsoft.VSCode)
    Studio 3T (com.install4j.8357-7994-5030-9105.837)
    Microsoft Teams (com.microsoft.teams)
    1Password (com.1password.1password)
    NepTunes Dock (YL78V8PY6H.pl.micropixels.NepTunes-Dock)

Additional context n/a

harikt commented 7 months ago

In my case, the windows move to another desktop. Say I have google chrome opened in Desktop 1, and opening i3 ( lets assume it is on Desktop 2 ) this switches the Chrome to someother window. This is not consistent, so may be moving to Desktop 3 or Desktop 4.