Skip to content

Instantly share code, notes, and snippets.

@flostellbrink
Last active December 29, 2023 14:52
Show Gist options
  • Save flostellbrink/7adfbac8b937cb08330bc301ef5827ce to your computer and use it in GitHub Desktop.
Save flostellbrink/7adfbac8b937cb08330bc301ef5827ce to your computer and use it in GitHub Desktop.
Karabiner Rules

Karabiner rules for easier mail and safari shortcuts.

  • Maps ⌘-r to refresh emails.
  • Maps ⌘-enter to send emails.
  • Maps ⌘- to switch to safari profile.
{
"description": "⌘-enter to send in Apple Mail",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "return_or_enter"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Apple Mail",
"bundle_identifiers": [
"com.apple.mail"
]
}
],
"to": [
{
"key_code": "d",
"modifiers": [
"shift",
"command"
]
}
]
}
]
}
{
"description": "⌘-number to switch profile in Safari",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "0"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "0",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "1"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "1",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "2"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "2",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "3"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "3",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "4"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "4",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "5"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "5",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "6"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "6",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "7"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "7",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "8"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "8",
"modifiers": [
"shift",
"option",
"command"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "9"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Safari",
"bundle_identifiers": [
"com.apple.Safari"
]
}
],
"to": [
{
"key_code": "9",
"modifiers": [
"shift",
"option",
"command"
]
}
]
}
]
}
{
"description": "⌘-r to refresh in Apple Mail",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"command"
]
},
"key_code": "r"
},
"conditions": [
{
"type": "frontmost_application_if",
"description": "Only for Apple Mail",
"bundle_identifiers": [
"com.apple.mail"
]
}
],
"to": [
{
"key_code": "n",
"modifiers": [
"shift",
"command"
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment