nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
5.34k stars 87 forks source link

Native macOS Big Sur tabs are considered windows #68

Open yanggggjie opened 8 months ago

yanggggjie commented 8 months ago
image

Hello everyone! When I open two or more IDEA projects with tabs. IDEAs take up space as white space.

Follow the steps below to reproduce 1. image

2.

image

3.open projects

How to open projects as tabs in IntelliJ - Stack Overflow

nikitabobko commented 8 months ago

macOS accessibility API reports tabs as windows. The issue is reproducible in Finder, Terminal.app, TextEdit, etc

Workaround: don't use this macOS feature. AeroSpace offers accordion layout that can be used as a replacement

References:

yanggggjie commented 8 months ago

It's solved, thank you for your wonderful answer. 🎄🎁

nikitabobko commented 8 months ago

I'd like to keep it open because there might be ways to detect such windows

GraemeARobinson commented 8 months ago

could yo detect them by checking whether they are all the same size and also in the foreground at the same time or have the same z-index or something like that?

totolouis commented 7 months ago

Just adding more context on this issue, since :

In particular, I'm interested in issues that block you from using AeroSpace on daily basis.

I got a workflow where I am dealing with some scripts in terminal where I need to have at least 6/7 tabs open per terminal. So most of the time, I have a setup where I am using 3 verticals terminals windows with Rectangle, with around 10 tabs. Also, this issue seems to happen with others app too, like Fork. So yeah, just to say that, as a user, may be hard to workaround over all the specific edges cases that trigger this behavior.

ubuntudroid commented 6 months ago

I also just found out about this the hard way. By switching between the tabs in Finder a few times I even got Aerospace to crash. If you tell me where to find it, I can attach a log.

ubuntudroid commented 6 months ago

Hm, I found the location where the log is supposed to be in another issue: /tmp/bobko.aerospace/runtime-error.txt. But that folder unfortunately doesn't exist for me. 🤷

nikitabobko commented 6 months ago

Hm, I found the location where the log is supposed to be in another issue: /tmp/bobko.aerospace/runtime-error.txt

AeroSpace detects some of its crashes but not all of them. If AeroSpace manages to detect the crash then Terminal.app is opened with the crash log and the crash log is located in /tmp/bobko.aerospace/runtime-error.txt

In your case, it's probably a more severe crash. And AeroSpace couldn't detect it. You can find logs of severe crashes in Console.app

ubuntudroid commented 6 months ago

You are right, I found it via Console. Had to zip it for Github to allow me to upload it though. 😅

AeroSpace-2024-02-13-122813.ips.zip

nikitabobko commented 6 months ago

@ubuntudroid thanks for the report! Your stacktrace is the same as in #164

nazriel commented 4 months ago

Looks like Amethyst somehow works around this issue since windows with native tabs stay balanced most of the time. In worst case scenario if I spam tabs too much it swaps places with other window. Other than that it works.

PawKanarek commented 1 month ago

So there is a workaround? i tried

defaults write NSGlobalDomain NSWindowTabbingEnabled -bool false

But still new terminal tabs are interferencing with aerospace.

pszypowicz commented 1 month ago

I got a workflow where I am dealing with some scripts in terminal where I need to have at least 6/7 tabs open per terminal. So most of the time, I have a setup where I am using 3 verticals terminals windows with Rectangle, with around 10 tabs. Also, this issue seems to happen with others app too, like Fork. So yeah, just to say that, as a user, may be hard to workaround over all the specific edges cases that trigger this behavior.

I know this is not a generic answer for all those cases, but at least for terminal, you could consider using something like tmux, where the concept of "terminal tabs" would translate to "tmux windows"

igorline commented 2 weeks ago

in my case I'm getting conflicts for librewolf and some other apps, like Alacritty or Slack, etc

is there anything I can try to do to fix it?

igorline commented 2 weeks ago

oh, the issue is related to when I'm actually restoring my session, I guess this would be similar issue then for firefox

davidwoodburn commented 2 weeks ago

This problem shows up with Skim too. I understand the difficulty presented by the way the system reports the tabs. But, the accordion solution is maybe a bit tedious. I often have a terminal window on the left of the screen and several tabbed pdfs on the right. If I understand correctly, I would have to join each new pdf to the other pdf windows and make sure that set is in accordion layout. But, then, the orientation of the accordion is not horizontal. Basically, the multiple steps required to arrange things compared with the system's method of automatically tabbing windows of the same application together is taxing. Is there a rule I could set that would automatically group windows of the same application in the same workspace?

hayden-electronx commented 2 weeks ago

I guess this explains why IntelliJ takes over multiple of my workspaces and sometimes fools me into thinking AeroSpace is broken (but really it's just that one workspace is one "tab" within intellij, another workspace is another. I landed here after checking all intelliJ keybindings for option-3/4). Particularly confusing when there's a floating settings menu open in one, but trying to open settings from the other workspace feels like a no-op (cause it's opening in the other WS). Now that I know, will report back here in a week or so if still feels buggy. May just be something we need to document, for now (though the floating window behavior could maybe be made more intuitive)

samholmes commented 1 week ago

If there was a way to configure that if a new window of the same application is opened while the current focused window is of that application to instead add the window under a new or current node for that window with accordion layout. This way, opening new tabs with Cmd+T in Finder would create the accordion layout needed to maintain navigation between tabs.