Created
August 16, 2012 11:36
-
-
Save cra/3369515 to your computer and use it in GitHub Desktop.
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
-- cfg_sp.lua | |
counter = {} | |
function kpress_count(binding, fn, args) | |
if counter.binding then | |
counter.binding = counter.binding + 1 | |
else | |
counter.binding = 1 | |
end | |
fn(unpack(args)) | |
print(binding .. "pressed" .. counter.binding .. " times.") | |
return kpress(binding, fn .. "(" .. upack(args) .. ")") | |
end | |
defbindings("WScreen", { | |
bdoc("Toggle scratchpad."), | |
kpress_count(ALTMETA.."Shift+C", "named_scratchpad", "{_, 'ims'}"), | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment