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 | |
local _factory = function(trigger, app) | |
return { | |
trigger = trigger, | |
fireIfModeIs = _G.HELLFIRE_MODES.DEFAULT, | |
callback = function() hs.application.launchOrFocus(app) end | |
} | |
end |
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/hellfuzzpack-apps-and-links.lua | |
-- require the Hellfuzz Helpers | |
local hfh = require('hellfred.hellfuzz.hellfuzz-helpers') | |
-- Create a standard callback function that gets | |
-- executed when a choice is selected. | |
-- The `choice` property from the subscriber is | |
-- passed as an argument. | |
local openAppCallback = function (choice) |
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 Hellfuzz, passing a hotkey | |
hellfuzz.init({{'shift','alt'},'h'}) | |
-- Load subscribers from packs | |
-- ... other code ... | |
hellfuzz.addSubscribers(require('hellfred.extend.basics.hellfuzzpack-apps-and-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/hellfuzzpack-apps-and-links.lua | |
-- require the Hellfuzz Helpers | |
local hfh = require('hellfred.hellfuzz.hellfuzz-helpers') | |
-- Create a standard callback function that gets | |
-- executed when a choice is selected. | |
-- The `choice` property from the subscriber is | |
-- passed as an argument. | |
local openAppCallback = function (choice) |
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 Hellfuzz subscriber | |
{ | |
choice = { | |
text, -- The choice text | |
subText, -- Supplementary choice text | |
image, -- An optional thumbnail image | |
}, | |
callback, -- A function to action when this choice is selected | |
nextChoicesFn, -- Returns a new set of subscribers | |
showInFirstChoiceSet -- Show this choice when Hellfuzz opens |
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 hellfuzz = require('hellfred.hellfuzz.hellfuzz') | |
-- Initialise Hellfuzz, passing a hotkey | |
hellfuzz.init({{'shift','alt'},'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
-- ... hellfred/hellfred-bootstrap.lua | |
local hellprompt = require('hellfred.hellprompt.hellprompt') | |
-- Initialise Hellprompt, passing a hotkey | |
hellprompt.init({{'shift','ctrl'},'h'}) | |
-- Load subscribers from packs | |
-- ... other code ... | |
hellprompt.addSubscribers(require('hellfred.extend.basics.hellpromptpack-commands')) |
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/hellpromptpack-commands.lua | |
-- Map strings to urls | |
local _linkMap = { | |
so = 'https://stackoverflow.com/', | |
news = 'https://news.ycombinator.com/', | |
github = 'https://github.com', | |
} | |
-- Map strings to name of 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
-- Structure of a Hellprompt subscriber | |
{ | |
filter, -- [optional] Used to filter the user command. A positive match flags the execution of the following callback... | |
callback -- a function that wraps an action/behaviour | |
} |
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 hellprompt = require('hellfred.hellprompt.hellprompt') | |
-- Initialise Hellprompt, passing a hotkey | |
hellprompt.init({{'shift','ctrl'},'h'}) |
NewerOlder