Created
June 9, 2022 21:43
-
-
Save bcosynot/e71d4a88b8a0c81fcc66bb5017868f5b to your computer and use it in GitHub Desktop.
My hammerspoon config for automating/shortcutting common tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Shortcuts to launch or switch focus to specific apps | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "i", function() | |
hs.application.launchOrFocus("IntelliJ IDEA") | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "b", function() | |
hs.application.launchOrFocus("Vivaldi") | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "t", function() | |
hs.application.launchOrFocus("iTerm") | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "m", function() | |
hs.application.launchOrFocus("Telegram") | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "g", function() | |
hs.application.launchOrFocus("Spotify") | |
end) | |
-- Shortcuts for common tasks | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "5", function() | |
hs.caffeinate.systemSleep() | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "1", function() | |
local output, status, type = hs.execute("makerflow meetings list", true) | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "2", function() | |
hs.alert.show("Starting lunch break...") | |
local outupt, status = hs.execute("makerflow break start --reason=lunch", true) | |
hs.alert.show(outupt) | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "3", function() | |
hs.alert.show("Going on a walk") | |
local output, status = hs.execute("makerflow break start --reason=walk", true) | |
print(stdout) | |
hs.alert.show(outupt) | |
end) | |
hs.hotkey.bind({"alt", "shift", "ctrl", "cmd"}, "4", function() | |
hs.alert.show("Stopping break...") | |
local output, status = hs.execute("bs", true) | |
hs.alert.show(output) | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment