diff options
author | Teddy Wing | 2019-06-17 20:03:55 +0200 |
---|---|---|
committer | Teddy Wing | 2019-06-17 20:03:55 +0200 |
commit | aacaa65c24a6e12e8708a61914870ad5d314915b (patch) | |
tree | 9b252fc0ab97df05be9917134f36183197e812c2 | |
parent | 86596d51926063a81e2e51db9f951e811824af6b (diff) | |
download | dothammerspoon-aacaa65c24a6e12e8708a61914870ad5d314915b.tar.bz2 |
Add application switching shortcuts
Bind a few F<n> keys to activate frequently used applications.
-rw-r--r-- | application_switch.lua | 17 | ||||
-rw-r--r-- | init.lua | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/application_switch.lua b/application_switch.lua new file mode 100644 index 0000000..8216878 --- /dev/null +++ b/application_switch.lua @@ -0,0 +1,17 @@ +local activateAllWindows = true + +hs.hotkey.bind({}, 'f1', function() + hs.application.find('com.apple.Terminal'):activate() +end) + +hs.hotkey.bind({}, 'f2', function() + hs.application.find('org.mozilla.nightly'):activate(activateAllWindows) +end) + +hs.hotkey.bind({}, 'f3', function() + hs.application.find('com.google.Chrome'):activate(activateAllWindows) +end) + +hs.hotkey.bind({}, 'f4', function() + hs.application.find('com.microsoft.rdc.osx.beta'):activate() +end) @@ -17,6 +17,7 @@ -- Enable command line tool (http://www.hammerspoon.org/docs/hs.ipc.html) require("hs.ipc") +require('application_switch') require('mouse') hs.loadSpoon('WindowMode') |