Skip to content

Instantly share code, notes, and snippets.

@temochka
Created February 25, 2021 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save temochka/e2a765eed2175baad6d774471fc27e3e to your computer and use it in GitHub Desktop.
Save temochka/e2a765eed2175baad6d774471fc27e3e to your computer and use it in GitHub Desktop.
An example of Anykey-like complex automation in karabiner.
{
"title": "Notes automations",
"rules": [
{
"description": "Launch Apple Notes automations in Alfred",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.apple\\.Notes$"
]
}
],
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": [
"left_command"
]
}
},
"to": [
{
"shell_command": "osascript -e 'tell application id \"com.runningwithcrayons.Alfred\" to run trigger \"script\" in workflow \"com.temochka.alfred.process\" with argument \"{\\\"alfredworkflow\\\":{\\\"title\\\":\\\"Move selected note(s)\\\",\\\"arg\\\":\\\"move_notes.scpt\\\",\\\"icon\\\":{\\\"path\\\":\\\"assets/icons/sticky-note.png\\\"},\\\"variables\\\":{\\\"filter_placeholder_title\\\":\\\"Choose the destination folder...\\\",\\\"filter_script\\\":\\\"filter_destination_folders.scpt\\\",\\\"focusedapp\\\":\\\"com.apple.Notes\\\"},\\\"anykey\\\":{\\\"key\\\":\\\"m\\\",\\\"modifiers\\\":[\\\"⌥\\\",\\\"⇧\\\"]}}}\"\n'"
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment