Skip to content

Commit

Permalink
Merge pull request #56 from mogenson/ms-office
Browse files Browse the repository at this point in the history
Ignore multiple tabs for non-Apple applications
  • Loading branch information
mogenson authored Nov 15, 2024
2 parents d2c0b73 + 3bdc430 commit 6d1ec0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,11 @@ function PaperWM:addWindow(add_window)
-- A new tab for a window will have tabCount equal to the total number of tabs
-- All existing tabs in a window will have their tabCount reset to 0
-- We can't query whether an exiting hs.window is a tab or not after creation
if add_window:tabCount() > 0 then
local apple <const> = "com.apple"
if add_window:tabCount() > 0 and add_window:application():bundleID():sub(1, #apple) == apple then
-- It's mostly built-in Apple apps like Finder and Terminal whose tabs
-- show up as separate windows. Third party apps like Microsoft Office
-- use tabs that are all contained within one window and tile fine.
hs.notify.show("PaperWM", "Windows with tabs are not supported!",
"See https://github.com/mogenson/PaperWM.spoon/issues/39")
return
Expand Down

0 comments on commit 6d1ec0a

Please sign in to comment.