aboutsummaryrefslogtreecommitdiffstats
path: root/ufo.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ufo.lua')
-rw-r--r--ufo.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/ufo.lua b/ufo.lua
index a14ff89..ae0e1ce 100644
--- a/ufo.lua
+++ b/ufo.lua
@@ -1,4 +1,4 @@
--- Copyright (c) 2019 Teddy Wing
+-- Copyright (c) 2019, 2021 Teddy Wing
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -14,6 +14,9 @@
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
+logger = hs.logger.new('ufo', 'debug')
+
+
ufo_mode = hs.hotkey.modal.new({'ctrl', 'option'}, 'u', 'UFO')
ufo_mode:bind({'ctrl', 'option'}, 'u', 'UFO Off', function()
ufo_mode:exit()
@@ -49,3 +52,11 @@ ufo_mode:bind({}, 'w', function()
ufo_mode:exit()
end)
+
+
+-- Shortcut to reload the UFO extension using Extreload
+hs.hotkey.bind({}, 'f12', function()
+ local output, status, type, rc = hs.execute('ufo-reload-extension', true)
+
+ logger:d('reloaded UFO: ', output, status, type, rc)
+end)