From 1a28f750394fe16ed75b971c2e88a974ad438617 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Sat, 6 Jun 2020 20:57:03 -0700 Subject: [PATCH] [hammerspoon] handle Zoom URLs Also update Ansible so Fennel works --- .hammerspoon/init.fnl | 6 ++++++ ansible/main.yml | 3 +++ ansible/playbooks/homebrew.yml | 1 + 3 files changed, 10 insertions(+) diff --git a/.hammerspoon/init.fnl b/.hammerspoon/init.fnl index fbc7da8..8a4ba3e 100644 --- a/.hammerspoon/init.fnl +++ b/.hammerspoon/init.fnl @@ -13,5 +13,11 @@ (hs.hotkey.bind mash "h" (fn [] (move :left))) (hs.hotkey.bind mash "l" (fn [] (move :right))) (hs.hotkey.bind mash "m" (fn [] (move :max))) + + ;; defeat paste blocking (hs.hotkey.bind [:cmd :alt] "v" (fn [] (hs.eventtap.keyStrokes (hs.pasteboard.getContents))))) +(set hs.urlevent.httpCallback (fn [scheme host params fullURL] + (if (string.find fullURL "^https?://.*[.]zoom.us/j/%d+") + (hs.urlevent.openURLWithBundle fullURL "us.zoom.xos") + (hs.urlevent.openURLWithBundle fullURL "org.mozilla.firefoxdeveloperedition")))) diff --git a/ansible/main.yml b/ansible/main.yml index 9eb07db..d40eb4f 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -16,6 +16,9 @@ - hosts: os_MacOSX roles: - role: osx + tasks: + - name: install fennel + command: luarocks install fennel - hosts: all roles: diff --git a/ansible/playbooks/homebrew.yml b/ansible/playbooks/homebrew.yml index 9c9086b..acce42c 100644 --- a/ansible/playbooks/homebrew.yml +++ b/ansible/playbooks/homebrew.yml @@ -30,6 +30,7 @@ - git-lfs - hledger - jq + - luarocks - macvim - mas - mosh