Skip to content
Matt Petty edited this page Sep 29, 2016 · 9 revisions

Hyper Hacks

init.lua

  • Trigger existing hyper key shortcuts:

-- Trigger existing hyper key shortcuts

k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end)
  • Call to a shell. Make sure to include the full path to the script/binary.

k:bind({}, 's', nil, function() hs.task.new('/usr/bin/say', nil, {'Hello, this is a test'}):start(); end)
  • Launch or focus an App:

-- Launch or Focus an App
launch = function(appname)
  hs.application.launchOrFocus(appname)
  k.triggered = true
end
k:bind({}, 'f', nil, function() launch('Finder') end)

Clone this wiki locally