[hammerspoon] special-case firefox for window management
change zwpoulptktlonnowmzlvxknxxvmumpkt
commit 36607b39cac4efa46db345cd7f728a4579653ae6
author Alpha Chen <alpha@kejadlen.dev>
date
parent wmmlmxmv
diff --git a/.hammerspoon/little-ff.fnl b/.hammerspoon/little-ff.fnl
index f0a07d73..f1b8e0b4 100644
--- a/.hammerspoon/little-ff.fnl
+++ b/.hammerspoon/little-ff.fnl
@@ -66,4 +66,4 @@
                                             ;; little ff window all that well
                                             )))))
 
-{: open : rehome}
+{: open : rehome : is-ff-focused : with-ax-hotfix}
diff --git a/.hammerspoon/wm.fnl b/.hammerspoon/wm.fnl
index df65d25c..1dd31cc3 100644
--- a/.hammerspoon/wm.fnl
+++ b/.hammerspoon/wm.fnl
@@ -1,6 +1,7 @@
 ;; Ported from https://github.com/miromannino/miro-windows-manager/blob/master/MiroWindowsManager.spoon/init.lua#L95-L121
 
 (local {:fnutils {:indexOf index-of}} hs)
+(local {: is-ff-focused : with-ax-hotfix} (require :little-ff))
 
 (local log (hs.logger.new :init :info))
 
@@ -22,7 +23,9 @@
                               (or -1)
                               (% (length steps))
                               (+ 1))
-          next-step (. steps next-step-index)]
-      (hs.grid.set win next-step screen))))
+          next-step (. steps next-step-index)
+          around (if (is-ff-focused) #(with-ax-hotfix (win:application) $1)
+                     #($1))]
+      (around #(hs.grid.set win next-step screen)))))
 
 {: init : step}