diff options
author | Teddy Wing | 2019-06-28 21:43:49 +0200 |
---|---|---|
committer | Teddy Wing | 2019-06-28 21:43:49 +0200 |
commit | 00f5db8faffddec04aac2b9e9f0597137bd36c99 (patch) | |
tree | 6250064f50a1f850a72be187f1821a299ace7e49 /ufo.lua | |
parent | 9abf894de98bf8ae936ec95eb9e373db9681c2ed (diff) | |
download | dothammerspoon-00f5db8faffddec04aac2b9e9f0597137bd36c99.tar.bz2 |
Add hotkey to reload AODocs UFO browser extension
Until live reloading is implemented, this compacts a bunch of repetitive
key presses into a modal shortcut.
Diffstat (limited to 'ufo.lua')
-rw-r--r-- | ufo.lua | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +ufo_mode = hs.hotkey.modal.new({'ctrl', 'option'}, 'u', 'UFO') +ufo_mode:bind({'ctrl', 'option'}, 'u', 'UFO Off', function() + ufo_mode:exit() +end) + +ufo_mode:bind({}, 'escape', 'UFO Off', function() + ufo_mode:exit() +end) + +-- Reload the UFO Chrome extension +ufo_mode:bind({}, 'r', function() + hs.eventtap.keyStroke({'command'}, '2') + hs.eventtap.keyStroke({'shift'}, 'tab') + hs.eventtap.keyStroke({}, 'tab') + hs.eventtap.keyStroke({}, 'space') + hs.eventtap.keyStroke({'command'}, '1') + hs.eventtap.keyStroke({'command'}, 'r') + + ufo_mode:exit() +end) |