Alfred
Updated Published 1 min read
A customizable version of the macOS Spotlight tool.
Recently, I have mainly been using raycast, which supports most of the main features of Alfred and has a better store, so this page is likely outdated
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:). Some of my own snippets are shared at https://github.com/dnnsmnstrr/workflows#snippets
Searches
These custom searches can be suggested when Alfred receives a query that it does not recognise (Fallback Search). There are built-in searches for common sites like Google, Wikipedia or Youtube, but here are some of my own (they can be installed by clicking on the link):
- GitHub
- Genius
- Alfred Forum
- bettertouchtool Forum
- Know Your Meme
- Urban Dictionary
- TV Tropes
- Snopes
Workflows
Development
Alfy
I mainly use this framework, as it allows me to create workflows using js
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²? (no note with this name), 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;
External Links
- Alfred Gallery - Official Workflow Gallery
- BTT Workflow by me (https://github.com/dnnsmnstrr/alfred-btt)
- Cheatsheet
- Script Filter JSON API
- Emoji Snippets
- My Workflows
Links from this note 6
- RaycastA launch bar similar to alfred. I have begun porting some of my workflows to Raycast, as it offers more flexibility in the presentation of the ui. Extensions I created an…
- MarkdownThese notes are all written in the Markdown format. Style Syntax italics *asterisks* _underscores_ bold **asterisks** strikethrough ~~tildes~~ Tools Markmap - npx markmap-cli…
- EmojiFavorites Some of my most used emoji: 😊 👍 😅 🤦♂️ (I'm an idiot pretty often) 😁 🦥 😘 🙈 😄 Me as an emoji 🦥 Links Emojipedia Emoji Snippet Pack for alfred My extension to…
- BetterTouchToolBTT is at the core of how I interact with macos. Most of the gestures and shortcuts I use are handled by this application. It also controls the touchbar and a stream deck where…
- ZettelkastenMy personal slip box. An alternate version, built using dendron can be found here I put my Zettel in my Zettelkasten. 80ac7e39 neuron - the framework I use for building and…
- JavaScriptFrameworks React react-native jest material-ui Tools Atom ide Node.js follow Best Practices Yarn New project: yarn init Fun JSFuck Resources freeCodeCamp