[hammerspoon] add a debounce function
diff --git a/.hammerspoon/utils.fnl b/.hammerspoon/utils.fnl
index bb93fc2b..3666065d 100644
--- a/.hammerspoon/utils.fnl
+++ b/.hammerspoon/utils.fnl
@@ -41,4 +41,11 @@
(cb)
(set ax-app.AXEnhancedUserInterface prev-val)))
-{: chomp : paste : replace-selection : run : with-ax-hotfix}
+(fn debounce [delay f]
+ (var timer nil)
+ (fn []
+ (when timer
+ (timer:stop))
+ (set timer (hs.timer.doAfter delay f))))
+
+{: chomp : debounce : paste : replace-selection : run : with-ax-hotfix}