From 2e737fd85c50286665633c4b1bf423517e1cbd3e Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Thu, 21 Apr 2022 14:22:02 -0400 Subject: [PATCH] prevent bugs in hammerspoon switcher --- hammerspoon.symlink/Spoons/Launcher.spoon/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hammerspoon.symlink/Spoons/Launcher.spoon/init.lua b/hammerspoon.symlink/Spoons/Launcher.spoon/init.lua index fb637a8..3ace40d 100644 --- a/hammerspoon.symlink/Spoons/Launcher.spoon/init.lua +++ b/hammerspoon.symlink/Spoons/Launcher.spoon/init.lua @@ -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()