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
-- ~/.hammerspoon/init.lua | |
require('hellfred.hellfred-bootstrap') |
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
-- ... hellfred/hellfred-bootstrap.lua | |
local hellfire = require('hellfred.hellfire.hellfire') | |
-- Initialise Hellfire, passing a hotkey | |
hellfire.init({{'shift','cmd'},'h'}) |
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
-- Structure of a Hellfire subscriber | |
{ | |
trigger, -- a key or sequence of keys that triggers the callback | |
callback -- a function that wraps an action/behaviour | |
fireIfModeIs, -- only execute callback if Hellfire is in this mode | |
} |
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
-- ... hellfred/extend/basics/hellfirepack-applications.lua | |
--- | |
--- A convenience method to create Subscriber objects | |
--- | |
--- @param trigger any A key or key sequence | |
--- @param app any Name of the app to launch | |
--- @return table Subscriber object | |
local _factory = function(trigger, app) | |
return { |
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
-- ... hellfred/hellfred-bootstrap.lua | |
-- Initialise Hellfire, passing a hotkey | |
hellfire.init({{'shift','cmd'},'h'}) | |
-- Load subscribers from packs | |
-- ... other code ... | |
hellfire.addSubscribers(require('hellfred.extend.basics.hellfirepack-applications')) |
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
-- ... hellfred/extend/basics/hellfirepack-common-links.lua | |
--- | |
--- A convenience method to create Subscriber objects | |
--- | |
--- @param trigger any A key or key sequence | |
--- @param url any URL to open | |
--- @param mode any Mode this trigger may fire in | |
--- @return table Subscriber object | |
local _factory = function(trigger, url) |
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
-- ... hellfred/hellfred-bootstrap.lua | |
-- Initialise Hellfire, passing a hotkey | |
hellfire.init({{'shift','cmd'},'h'}) | |
-- Load subscribers from packs | |
-- ... other code ... | |
hellfire.addSubscribers(require('hellfred.extend.basics.hellfirepack-applications')) | |
hellfire.addSubscribers(require('hellfred.extend.basics.hellfirepack-common-links')) |
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
-- ... hellfred/extend/basics/hellfire-modes-extended.lua | |
local modes = { | |
COMMON_LINKS = { | |
name = 'Common Links' | |
}, | |
} | |
return modes |
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
-- ... hellfred/hellfred-bootstrap.lua | |
-- Metadata | |
-- ... metadata is here .. | |
_G.HELLFIRE_MODES = require('hellfred.hellfire.hellfire-modes') | |
_G.HELLFIRE_MODES_EXTENDED = require('hellfred.extend.basics.hellfire-modes-extended') |
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
-- ... hellfred/extend/basics/hellfire-mode-triggers.lua | |
--- | |
--- A convenience method to create Subscriber objects | |
--- | |
--- @param trigger any A key or key sequence | |
--- @param nextMode any Mode to change to | |
--- @return table Subscriber object | |
local _factory = function(trigger, nextMode) | |
return { |
OlderNewer