The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Bring All Finder Windows To Front With Hammerspoon

TODO: Pull subtitle into page object code_start_default_section code_end_default_section

Notes

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

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. 

-- code/
-- title: ~/.hammerspoon/bring-finder-to-front.lua
-- export: /Users/alan/.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()

-- /code

-- notes

- I put that code in the file: 
`~/.hammerspoon/bring-finder-to-front.lua``

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

`require('bring-finder-to-front')``


-- ref
-- url: https://www.hammerspoon.org/docs/hs.window.filter.html#getWindows

-- ref
-- url: https://www.hammerspoon.org/docs/hs.grid.html

-- ref
-- url: http://www.hammerspoon.org/Spoons/ReloadConfiguration.html

-- ref
-- url: https://www.hammerspoon.org/docs/index.html

-- ref
-- url: https://www.hammerspoon.org/go/

-- ref
-- url: https://www.hammerspoon.org/docs/hs.window.html#raise

-- ref
-- url: https://www.hammerspoon.org/docs/hs.layout.html

-- categories
-- dotfiles 
-- Hammerspoon 

-- metadata
-- date: 2023-09-04 17:17:47
-- id: 2uwt32ph
-- site: aws
-- type: dotfile 
-- status: published