main
Alpha Chen 1 year ago
parent b111a01d59
commit 0469e05e19
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -12,6 +12,7 @@
: notify : notify
: pasteboard : pasteboard
: uielement : uielement
: urlevent
: window} hs) : window} hs)
(local log (logger.new :log :info)) (local log (logger.new :log :info))
@ -92,25 +93,33 @@
(set window.animationDuration 0.0) (set window.animationDuration 0.0)
(Install:andUse :MiroWindowsManager {: hotkeys}) (Install:andUse :MiroWindowsManager {: hotkeys})
(let [browsers {:arc :company.thebrowser.Browser ;; By default, URLDispatcher focuses the application before opening the URL, but
;; this interacts poorly with Arc since then we can be in the wrong space when
;; the URL is opened in Little Arc.
(let [handlers {:arc #(urlevent.openURLWithBundle $1
:company.thebrowser.Browser)
:firefox-dev :org.mozilla.firefoxdeveloperedition :firefox-dev :org.mozilla.firefoxdeveloperedition
:firefox :org.mozilla.firefox :firefox :org.mozilla.firefox
:safari :com.apple.Safari :safari :com.apple.Safari
:zoom :us.zoom.xos} :zoom :us.zoom.xos}
url_patterns [["^https://(.*%.?)zoom.us/j/%d+" browsers.zoom] url_patterns [["^https://(.*%.?)zoom.us/j/%d+" handlers.zoom]
["^https://(.*%.?)discnw.org/?" browsers.safari] ["^https://(.*%.?)discnw.org/?" handlers.safari]
["^https://(.*%.?)squareupmessaging.com/?" browsers.safari] ["^https://(.*%.?)squareupmessaging.com/?" handlers.safari]
["^https://(.*%.?)bulletin.com/?" browsers.safari] ["^https://(.*%.?)bulletin.com/?" handlers.safari]
["^https://(.*%.?)store.apple.com/?" browsers.safari] ["^https://(.*%.?)store.apple.com/?" handlers.safari]
["^https://(.*%.?)goodluckbread.com/?" browsers.safari] ["^https://(.*%.?)goodluckbread.com/?" handlers.safari]
["^https://community.glowforge.com/?" browsers.arc] ["^https://community.glowforge.com/?" handlers.arc]
["^https://accounts.google.com/?" browsers.arc]] ["^https://accounts.google.com/?" handlers.arc]]
url_redir_decoders [[:sci-hub url_redir_decoders [[:sci-hub
"^https://doi.org/(.*)" "^https://doi.org/(.*)"
"https://sci-hub.st/%1"]]] "https://sci-hub.st/%1"]
[:twitter
"^https://twitter.com/(.*)"
"https://nitter.net/%1"]]]
(Install:andUse :URLDispatcher {:config {: url_patterns (Install:andUse :URLDispatcher {:config {: url_patterns
: url_redir_decoders : url_redir_decoders
:default_handler browsers.firefox-dev} :default_handler handlers.arc
:set_system_handler true}
:start true})) :start true}))
(Install:andUse :ReloadConfiguration {:start true}) (Install:andUse :ReloadConfiguration {:start true})

Loading…
Cancel
Save