diff options
author | Teddy Wing | 2019-07-25 00:17:34 +0200 |
---|---|---|
committer | Teddy Wing | 2019-07-25 00:17:34 +0200 |
commit | bb85b4795b5d3cd07c62c26b6040ab2935f313d8 (patch) | |
tree | 28e901d6009e20de6c4e7802f57b6136c9c87b5e /init.lua | |
parent | 826bff35755e4b2692316f8916facc6f39087158 (diff) | |
download | dothammerspoon-bb85b4795b5d3cd07c62c26b6040ab2935f313d8.tar.bz2 |
init: New F5 mapping to reload UFO Chrome extension
Reloads the UFO Chrome extension and opens a file in a single one-button
mapping.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -34,9 +34,15 @@ end) -- Temporary browser extension reload mapping hs.hotkey.bind({}, 'f5', function() - local position = hs.window.frontmostWindow():zoomButtonRect() - position.x = position.x + 925 - position.y = position.y + 45 - - hs.eventtap.leftClick(position) + hs.eventtap.keyStroke({'ctrl', 'option'}, 'u') + hs.timer.doAfter(0.5, function() + hs.eventtap.keyStroke({}, 'r') + end) + + hs.timer.doAfter(10, function() + hs.eventtap.keyStroke({'ctrl', 'option'}, 'o') + hs.timer.doAfter(0.5, function() + hs.eventtap.keyStroke({}, '0') + end) + end) end) |