Last active
April 8, 2025 20:41
-
-
Save szhu/254b634be6a57473e20f048b3849acf8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ~/.hammerspoon/init.lua | |
-- https://chatgpt.com/share/679c6282-322c-8007-9421-d7a0513d1a5f | |
hs.window.filter.default:subscribe(hs.window.filter.windowCreated, function(win) | |
print(win:application():bundleID()) | |
-- if win:application():bundleID() == "com.microsoft.VSCode" then return end | |
if not win:isStandard() then return end | |
if win:tabCount() ~= nil and win:tabCount() > 1 then return end | |
if not win:isMaximizable() then return end | |
win:centerOnScreen() | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment