You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
396 B
10 lines
396 B
2 years ago
|
(fn modal-bind [mods key message bindings]
|
||
|
(let [modal (hs.hotkey.modal.new mods key message)]
|
||
|
(tset modal :entered #(hs.timer.doAfter 0.5 #(modal:exit)))
|
||
|
; (tset modal :exited #(hs.alert :exited))
|
||
|
(each [_ [mods key message f] (ipairs bindings)]
|
||
|
(modal:bind mods key message #(do (f) (modal:exit))))))
|
||
|
|
||
|
{:mash [:cmd :alt :ctrl] :smash [:cmd :alt :ctrl :shift] : modal-bind}
|
||
|
|