Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Bring All Finder Windows To Front With Hammerspoon

One annoyance with macOS is switching to the Finder in Alfred only brings one window forward. Others remain hidden behind the prior app.

I'm solving that with Hammerspoon. This snippet triggers the "Bring All to Front" menu item in the Finder whenever it's activated.

~/.hammerspoon/bring-finder-to-front.lua

local function finderWatcher(app, event, appObj) 
  if app == "Finder" then
    if event == hs.application.watcher.activated then
      appObj:selectMenuItem("Bring All to Front")
    end
  end
end

local appWatcher = hs.application.watcher.new(finderWatcher)
appWatcher:start()

- I put that code in the file : [TODO: Code shorthand span ]

- The code is loaded into Hammerspoon by adding this to the config :

[TODO: Code shorthand span ]

Footnotes And References