We're moving away from having an IRC channel (since it was very under-utilised) and instead have created a Discord server. If you would like to chat about Hammerspoon, ask questions, get support, or just lurk, here is the invite link:
discord.gg/vxchqkRbkR
Call me impressed by CoPilot.
I was looking for a way to close all windows but the front app and sat down to use @_hammerspoon to script it.
I just wrote the function name "closeAllButFrontWindow" and the print string. copilot wrote the rest.
ALT function closeAllButFrontWindow()
print("Closing all but front window")
local frontapp = hs.application.frontmostApplication()
local frontwindow = frontapp:focusedWindow()
local allwindows = frontapp:allWindows()
for i, window in ipairs(allwindows) do
if window ~= frontwindow then
window:close()
end
end
end
hotkey.bind(hypersmash, 'c', closeAllButFrontWindow)
We've been making some huge changes to the way Hammerspoon gets built - if you're feeling brave, we would love some feedback on whether it's working properly.
You can download a signed/notarized build from github.com/Hammerspoon/hamme… if you'd like to try. Please say if it works fine!