ianyh / Amethyst

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

BSP layout fails to tile tabbed windows #1094

Open iam-cult opened 3 years ago

iam-cult commented 3 years ago

Describe the bug Whenever an application uses the native macOS tab system (for example: Finder), when a window is opened as a new tab, and the current Amethyst layout is Binary Space Partitioning, windows are tiled as if each tab was an individual window, instead of just one tabbed window.

Applications: Any app that makes use of the native tabs

To Reproduce

  1. Enable "Open folders in tabs instead of new windows" in Finder preferences
  2. Enable the Binary Space Partitioning layout
  3. Open finder in an empty desktop
  4. Right-click on a folder and select "Open in New Tab"
  5. Finder will open the folder in a New Tab, but will be tiled to take up only half the screen

Expected behavior The window should take up the whole desktop, as it is a single window

Screenshots Screen Shot 2021-02-04 at 11 41 11 Screen Shot 2021-02-04 at 11 42 57 Screen Shot 2021-02-04 at 11 44 09 Screen Shot 2021-02-04 at 11 45 34

Versions:

Debug Info


$ /Applications/Amethyst.app/Contents/MacOS/Amethyst --debug-info

Version: 0.15.4 (91)

OS version: Version 10.15.7 (Build 19H15)

Has permissions: true

Screens:
    (0.0, 0.0, 1920.0, 1080.0) [(0.0, 0.0, 1920.0, 1080.0)]

Manageable applications:
    talagent (com.apple.talagent)
    AppSSOAgent (com.apple.AppSSOAgent)
    Spotify (com.spotify.client)
    Atom (com.github.atom)
    Preview (com.apple.Preview)
    Firefox (org.mozilla.firefox)
    iTerm2 (com.googlecode.iterm2)
    zoom.us (us.zoom.xos)
    QuickTime Player (com.apple.QuickTimePlayerX)
    Finder (com.apple.finder)

Configuration:
float-small-windows: 1
mod2: (
    option,
    shift,
    control
)
window-minimum-width: 0
screen-padding-left: 5
mod1: (
    option,
    shift
)
screen-padding-right: 5
floating-is-blacklist: 1
restore-layouts-on-launch: 1
focus-follows-mouse: 0
use-canary-build: 0
layouts: (
    bsp,
    tall,
    wide,
    fullscreen,
    column,
    floating
)
window-minimum-height: 0
screen-padding-bottom: 10
ignore-menu-bar: 0
window-margin-size: 10
new-windows-to-main: 0
follow-space-thrown-windows: 1
floating: (
        {
        id = "com.apple.systempreferences";
        "window-titles" =         (
        );
    },
        {
        id = "com.apple.finder";
        "window-titles" =         (
            "XtraFinder Preferences"
        );
    },
        {
        id = "com.apple.QuickTimePlayerX";
        "window-titles" =         (
            "Audio Recording"
        );
    }
)
enables-layout-hud: 1
window-resize-step: 5
mouse-swaps-windows: 1
enables-layout-hud-on-space-change: 0
mouse-resizes-windows: 1
window-margins: 1
mouse-follows-focus: 0
debug-layout-info: 0
screen-padding-top: 35```

**Additional context**
Add any other context about the problem here.
KingOfSpades commented 3 years ago

Tried to reproduce on macOS 11.1 but it's working fine here. Could I ask you what awesome menu bar you're using?

Debug

/Applications/Amethyst.app/Contents/MacOS/Amethyst --debug-info
Version: 0.15.4 (91)

OS version: Version 11.1 (Build 20C69)

Has permissions: false

Screens:
    (0.0, 0.0, 1920.0, 1080.0) [(0.0, 0.0, 1920.0, 1080.0)]
    (1920.0, 0.0, 1920.0, 1080.0) [(1920.0, 0.0, 1920.0, 1080.0)]

Manageable applications:
    -- Omitted --

Configuration:
mod2: (
    option,
    shift,
    control
)
screen-padding-top: 0
mouse-resizes-windows: 1
focus-follows-mouse: 0
window-minimum-height: 0
use-canary-build: 0
float-small-windows: 1
follow-space-thrown-windows: 1
layouts: (
    tall,
    wide,
    fullscreen,
    column
)
debug-layout-info: 0
window-minimum-width: 0
mouse-swaps-windows: 1
window-resize-step: 5
enables-layout-hud-on-space-change: 0
new-windows-to-main: 0
)
ignore-menu-bar: 0
floating-is-blacklist: 1
window-margins: 1
mouse-follows-focus: 0
restore-layouts-on-launch: 1
mod1: (
    option,
    shift
)
screen-padding-right: 0
screen-padding-left: 0
window-margin-size: 5
enables-layout-hud: 1
screen-padding-bottom: 0
iam-cult commented 3 years ago

Interesting.

Could I ask you what awesome menu bar you're using?

I'm using the Simple Bar Übersicht widget (https://github.com/Jean-Tinland/simple-bar) which technically depends on the Yabai WM, but I just keep it running in the background without turning its tiling on.

iam-cult commented 3 years ago

@KingOfSpades, looking at your Debug Info, it doesn't look like you have the BSP layout enabled? For me this issue is confined to BSP

iam-cult commented 3 years ago

This appears to happen when any application tries to stack windows on top of each other, as I have observed this behavior in non-native tabs, e.g. the tab feature in XtraFinder, although in this case the problem spanned all layouts (excluding Floating and fullscreen)

s00500 commented 3 years ago

I also have this issue... funny that I was also using simple bar for some time, but I have disabled it and Übersicht and Hammerspoon..... still having the issue.

Easy to reproduce: select bsp as default, open firefox window with some tabs, open second firefox window, open mission control and move second firefox window to the next space, then move back and forth between the two spaces, amethyst will keep trying to make the first window half size even though it is the only window available... I can also add a video if needed

ianyh commented 1 year ago

Potentially addressed by #1360