From 4d121f7317c02fd3796b4a4da9861b2b00d3a77b Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 28 Apr 2023 13:23:58 -0700 Subject: [PATCH] fix wm in hammerspoon --- .hammerspoon/init.fnl | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.hammerspoon/init.fnl b/.hammerspoon/init.fnl index e5fb503..48f5543 100644 --- a/.hammerspoon/init.fnl +++ b/.hammerspoon/init.fnl @@ -92,14 +92,38 @@ (set Install.use_syncinstall true) ;; fnlfmt: skip -(let [hotkeys {:up [mash :k] - :left [mash :h] - :down [mash :j] - :right [mash :l] - :fullscreen [mash :m] - :nextscreen [mash :n]}] - (set window.animationDuration 0.0) - (Install:andUse :MiroWindowsManager {: hotkeys})) +(local hotkeys {:up [mash :k] + :left [mash :h] + :down [mash :j] + :right [mash :l] + :fullscreen [mash :m] + :nextscreen [mash :n]}) + +(set window.animationDuration 0.0) +(Install:andUse :MiroWindowsManager {:config {:GRID {:w 6 :h 4}} : hotkeys}) + +(Install:andUse :WindowGrid {:config {:gridGeometries [[:6x4]]} + :hotkeys {:show_grid [mash :g]} + :start true}) + +(let [browsers {:arc :company.thebrowser.Browser + :firefox-dev :org.mozilla.firefoxdeveloperedition + :firefox :org.mozilla.firefox + :safari :com.apple.Safari + :zoom :us.zoom.xos} + url_patterns [["^https://(.*%.?)zoom.us/j/%d+" browsers.zoom] + ["^https://(.*%.?)discnw.org/?" browsers.safari] + ["^https://(.*%.?)squareupmessaging.com/?" browsers.safari] + ["^https://(.*%.?)bulletin.com/?" browsers.safari] + ["^https://(.*%.?)store.apple.com/?" browsers.safari] + ["^https://(.*%.?)goodluckbread.com/?" browsers.safari]] + url_redir_decoders [[:sci-hub + "^https://doi.org/(.*)" + "https://sci-hub.st/%1"]]] + (Install:andUse :URLDispatcher {:config {: url_patterns + : url_redir_decoders + :default_handler browsers.firefox-dev} + :start true})) (Install:andUse :ReloadConfiguration {:start true})