prevent bugs in hammerspoon switcher

This commit is contained in:
Noah Masur 2022-04-21 14:22:02 -04:00
parent ba3aa9cd93
commit 2e737fd85c

View File

@ -25,7 +25,9 @@ end
function obj:init()
-- Begin launcher mode
self.launcher = hs.hotkey.modal.new("ctrl", "space")
if self.launcher == nil then
self.launcher = hs.hotkey.modal.new("ctrl", "space")
end
-- Behaviors on enter
function self.launcher:entered()
@ -44,6 +46,7 @@ function obj:init()
end)
-- Launcher shortcuts
self.launcher:bind("ctrl", "space", function() end)
self.launcher:bind("", "space", function()
hs.hints.windowHints()
self.launcher:exit()