From f298e018126d2203fd56965c7fc7ee58283142b7 Mon Sep 17 00:00:00 2001 From: Darren Cheng Date: Sun, 1 Nov 2026 16:48:07 -0800 Subject: [PATCH] Fix browser profile menu hotkey on new macOS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the fn+ctrl+F2 menu-bar focus keystroke, which raced with selectMenuItem and left the menu stuck open. Check that a Profiles menu exists first and log when it doesn't. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- hammerspoon/browser.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hammerspoon/browser.lua b/hammerspoon/browser.lua index 3eb17eba..fa87d2a1 100644 --- a/hammerspoon/browser.lua +++ b/hammerspoon/browser.lua @@ -18,8 +18,10 @@ function browser.openProfileMenu() if app == nil then return end if app:name() == 'Safari' then return end app:activate() - -- focus on menubar if auto-hidden - hs.eventtap.keyStroke({'fn', 'ctrl'}, 'f2') + if not app:findMenuItem({'Profiles'}) then + hs.printf('openProfileMenu: no "Profiles" menu found in %s', app:name()) + return + end app:selectMenuItem({'Profiles'}) end