cmsj / hammerspoon-config Goto Github PK
View Code? Open in Web Editor NEWMy configuration for Hammerspoon (http://www.hammerspoon.org)
My configuration for Hammerspoon (http://www.hammerspoon.org)
You might not want your unsplash client id exposed for the world
https://github.com/cmsj/hammerspoon-config/blob/master/init.lua#L507
One of the hammerspoon abilities I love most is the ability to use it to access passwords and generic info in KeyChain:
function extractPassword(type, service)
local cmd = "security " .. type .. " -s " .. service .. " -a " .. os.getenv("USER") .. " -w"
local str_p, status = hs.execute(cmd)
str_p = string.gsub(str_p, "\n", "")
return str_p
end
used like:
hs.hotkey.bind({"cmd", "alt"}, "S", nil, function()
-- CLI: security add-generic-password -a ${USER} -s "ssh passphrase" -w
local str_p = extractPassword("find-generic-password", "'ssh passphrase'")
str_p = string.gsub(str_p, "\n", "") -- trim newline
hs.eventtap.keyStrokes(str_p)
end)
or
hs.hotkey.bind({"cmd", "alt"}, "P", nil, function()
-- CLI: security add-internet-password -a
local str_p = extractPassword("find-internet-password", hs.host.localizedName())
str_p = string.gsub(str_p, "\n", "") -- trim newline
hs.eventtap.keyStrokes(str_p)
end)
the latter is golden for the countless times I get asked each day for my password on work web sites.
Thanks for all the work you put into Hammerspoon - it makes my Mac life far nicer!
Would love to see /Users/cmsj/bin/check_updates.sh so I can better understand how to make use of statuslets.lua. Would it be possible to commit a sanitized version ?
Hi,
I can't make it work... Can you share your private.xml please ?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.