Created
June 7, 2020 15:35
-
-
Save zhiyelee/b8e7d8c73906474b44e63d3963e431bc to your computer and use it in GitHub Desktop.
Hammerspoon: start RescueTime Focus on with shortcuts
This file contains hidden or 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
--- start resucueTime FocusTime session | |
function start_focus_time(duration) | |
return function() | |
local focusTimeURLTpl = "https://www.rescuetime.com/anapi/start_focustime?key=%s&duration=%d" | |
local RESCUETIME_KEY = 'YOUR_RESCUETIME_APIKEY' | |
hs.http.post(string.format(focusTimeURLTpl, RESCUETIME_KEY, duration)) | |
end | |
end | |
hs.hotkey.bind({"alt", "shift"}, "f", start_focus_time(30)) | |
--- end rescueTime focus time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, really nice! I just sent in a feature request for keybindings, but this is such a clever work-around. Use the API! Great idea <3