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

Native macOS Big Sur tabs are considered windows #68

Open
yanggggjie opened this issue Dec 23, 2023 · 22 comments
Open

Native macOS Big Sur tabs are considered windows #68

yanggggjie opened this issue Dec 23, 2023 · 22 comments
Labels
bug Something isn't working as expected triaged The issue makes sense to maintainers

Comments

@yanggggjie
Copy link

yanggggjie commented Dec 23, 2023

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

image

3.open projects

How to open projects as tabs in IntelliJ - Stack Overflow

@nikitabobko nikitabobko changed the title BUG open IDEA projects as tab will display blank Native macOS Big Sur tabs are considered windows Dec 24, 2023
@nikitabobko
Copy link
Owner

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
Copy link
Author

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

@nikitabobko
Copy link
Owner

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

@nikitabobko nikitabobko reopened this Dec 24, 2023
@GraemeARobinson
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link
Owner

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
Copy link

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
Copy link
Owner

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

@nikitabobko nikitabobko added the bug Something isn't working as expected label Feb 17, 2024
@nazriel
Copy link

nazriel commented Apr 23, 2024

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
Copy link

So there is a workaround? i tried

defaults write NSGlobalDomain NSWindowTabbingEnabled -bool false

But still new terminal tabs are interferencing with aerospace.

@pszypowicz
Copy link

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
Copy link

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
Copy link

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

@davidwoodburn
Copy link

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
Copy link

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
Copy link

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.

@nikitabobko nikitabobko added the triaged The issue makes sense to maintainers label Oct 27, 2024
@marvelph
Copy link

AltTab combines native tabs into a single item.
By changing the settings, tabs can be separated into separate items as windows.
https://github.com/lwouis/alt-tab-macos

@marvelph
Copy link

marvelph commented Nov 7, 2024

@nikitabobko How about mimicking the logic of AltTab?
lwouis/alt-tab-macos#1540

@FormalSnake
Copy link

What if there was a way to do it in the config?
For example, you can do a on-window-detected or smth, configure what the new tab hotkey is in that application is, and aerospace then detects if that key is pressed and a new "window" was opened, and then just not tile it.

[[on-window-detected]]
if.app-id = 'com.mitchellh.ghostty'
run = "move-node-to-workspace T"
new-tab-hotkey = "cmd-t"
dont-tile-tabs = true

or something in this trend, i think this idea might work although not perfect

@mrtolkien
Copy link

Just wanna say it's pretty sad that pretty much everything MacOS native for window management (spaces, fullscreen mode, native tabs, ...) end up making things harder for actual good window management tools.

Alt-tab does it pretty well and I'm looking forward to a workaround here too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected triaged The issue makes sense to maintainers
Projects
None yet
Development

No branches or pull requests