Last active
October 8, 2019 17:24
-
-
Save psifertex/aad97d009e6f21d3380d49fc36331ab5 to your computer and use it in GitHub Desktop.
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
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "4", function() | |
local timeStamp = string.gsub(os.date("%Y-%m-%d_%T"), ":", ".") | |
local fileName = os.getenv("HOME") .. "/Desktop/ss-" .. timeStamp .. ".png" | |
local windowId = hs.window.frontmostWindow():id() | |
hs.task.new("/usr/sbin/screencapture", nil, {"-l" .. windowId, fileName }):start() | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment