aboutsummaryrefslogtreecommitdiffstats
path: root/ufo.lua
blob: c374a65dd491fd26e41b06d32c68b351c3104c95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)