diff options
author | Teddy Wing | 2021-03-03 20:11:17 +0100 |
---|---|---|
committer | Teddy Wing | 2021-03-03 20:11:17 +0100 |
commit | 487ff34d75b034814a9b8bdd352e2ede38395c25 (patch) | |
tree | 39b684ed5eac8ec332b97891bba5ed9edb66b3a6 | |
parent | decabccb24214d5c93f5bf8b17ebc21244eb733a (diff) | |
download | dothammerspoon-487ff34d75b034814a9b8bdd352e2ede38395c25.tar.bz2 |
ufo: Reload UFO extension with Extreload on F12
Easily reload the extension by pressing F12.
-rw-r--r-- | ufo.lua | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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) |