Skip to content

Instantly share code, notes, and snippets.

@asmagill
asmagill / dash.lua
Created September 19, 2015 22:37
Sample Hammerspoon Dash docset viewer
--
-- Requirements: hs.webview -- currently a proposed module addition
-- (see https://github.com/Hammerspoon/hammerspoon/pull/544)
-- luarocks-5.3, lsqlite3 lua-rock, and sqlite3 installed with extension support
-- (stock 10.11 sqlite3 doesn't have this... not sure about earlier OS X's,
-- but the brew versions work)
-- Uncompressed Hammerspoon.docset (Dash 2 version will work, not sure yet how to
-- uncompress Dash 3 version yet...)
--
-- Update _rootPath to match where your docset is located
@asmagill
asmagill / ctrlDoublePress.lua
Created April 18, 2016 03:20
Capture double tap of Ctrl in Hammerspoon
local alert = require("hs.alert")
local timer = require("hs.timer")
local eventtap = require("hs.eventtap")
local events = eventtap.event.types
local module = {}
-- Save this in your Hammerspoon configuration directiorn (~/.hammerspoon/)
-- You either override timeFrame and action here or after including this file from another, e.g.