Alfred
A customizable version of the macOS Spotlight tool. I keep my Alfred preferences symlinked within the Dotfiles directory.
Snippets
Alfred allows the creation of Snippets, which can be auto-expanded when a certain keyword is typed. Some of my favorites are mdl
for Markdown links and Emoji-completion (:emoji:
)
Workflows
Development
Alfy
I mainly use this framework, as it allows me to create workflows using JavaScript
Symlinking
npx alfred-link
Link current directory to workflows directory: ln -s "$(pwd)" ~/.dotfiles/alfred/workflows
Script filters
{"items": [
{
"uid": "desktop",
"type": "file",
"title": "Desktop",
"subtitle": "~/Desktop",
"arg": "~/Desktop",
"autocomplete": "Desktop",
"icon": {
"type": "fileicon",
"path": "~/Desktop"
}
}
]}
Modifiers
"mods": {
"cmd": {
"valid": true,
"arg": "",
"subtitle": ""
}
}
mods: {
alt: {
valid: true,
arg: `${alfy.input}`,
subtitle: `${alfy.input}`
}
}
Icons
Using workflow², you can search for built-in icons in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/
and generate icon paths.
macOS icns
Using workflow², you can search for built-in icons in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/
Icons for Apps
// in js
icon: {
type: 'fileicon',
path: '/Applications/APPNAME.app'
},
// hardcoded
"icon": {
"path": "/Applications/APPNAME.app/Contents/Resources/APP_ICON.icns"
}
Environment Variables
const { VARIABLE } = process.env;