From c1b42e6e643d77a8d8e98157b4f9c48aa5451ae6 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 19 Jun 2019 21:50:46 +0200 Subject: application_switch: Add shortcuts for more frequently used applications Hide these under a mode switch as they're not as frequently used as the others defined at the top of the file. --- application_switch.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'application_switch.lua') diff --git a/application_switch.lua b/application_switch.lua index 8216878..aa00fc1 100644 --- a/application_switch.lua +++ b/application_switch.lua @@ -15,3 +15,29 @@ end) hs.hotkey.bind({}, 'f4', function() hs.application.find('com.microsoft.rdc.osx.beta'):activate() end) + +-- Mode to activate lesser-used applications +application_switch_mode = hs.hotkey.modal.new({}, 'f13') + +application_switch_mode:bind({}, 'l', function() + hs.application.find('org.libreoffice.script'):activate(activateAllWindows) + + application_switch_mode:exit() +end) + +application_switch_mode:bind({}, 'w', function() + hs.application.find('com.microsoft.Word'):activate(activateAllWindows) + + application_switch_mode:exit() +end) + +application_switch_mode:bind({}, 't', function() + hs.application.find('com.googlecode.iterm2'):activate(activateAllWindows) + + application_switch_mode:exit() +end) + +-- TODO: Don't do that with a mode, just a list of keys, as the mode sometimes +-- doesn't activate quick enough + +-- TODO: If we stick with F13, maybe bind keys under the left hand to make it usable without looking -- cgit v1.2.3