mogenson / PaperWM.spoon

Tiled scrollable window manager for MacOS
MIT License
442 stars 19 forks source link

Terminal and Finder tabs are detected as unique windows and tiled with gaps #39

Open mogenson opened 8 months ago

mogenson commented 8 months ago

Open a new tab in a Terminal or Finder window (may also occur in other applications). That window will be moved right the width of the window. This is because we are detecting the new tab as a unique window with a width of the original window.

Figure out how to detect when a window is a tab and ignore it. Maybe compare window ID with the window list?

mogenson commented 7 months ago

Being worked on in #41

mogenson commented 6 months ago

Blocked by issues: https://github.com/Hammerspoon/hammerspoon/issues/3625 and https://github.com/Hammerspoon/hammerspoon/issues/3626

tshort commented 2 months ago

The MS-Office suite of programs seems to be caught by the tab warning. That's surprising given that I don't see any tabs in these programs.

I had to disable the tab check for this spoon to be usable at all. I don't use tabs in Finder much, so this is an easy solution for me.

mogenson commented 2 months ago

@tshort That's a shame to hear. There's no good way for PaperWM.spoon to determine whether a tab is a "real" tab or part of a larger window, like it seems MS Office is doing.

How about either a global config to enable/disable the unsupported tab warning or a window filter override to disable the warning per application?

bestguy commented 1 month ago

Just an FYI, the behavior seems "better" in the newly released macOS 15 Sequoia and hammerspoon 1.0 - at least from when I last tried this. I don't want to imply everything works perfectly now, but I'm not seeing the extra gaps when there are tabs.

mogenson commented 1 month ago

Great! Good to close this issue then?

bestguy commented 1 month ago

Actually, my apologies - if you remove the check for if add_window:tabCount() > 0 then here you actually do still see the gaps. I was confusing the check exiting early with gaps being fixed. I think you should leave this open.