Skip to content

Instantly share code, notes, and snippets.

@bdsaglam
Created February 7, 2021 16:54
Show Gist options
  • Select an option

  • Save bdsaglam/95a91c77597024b1e8892676d9d6e75e to your computer and use it in GitHub Desktop.

Select an option

Save bdsaglam/95a91c77597024b1e8892676d9d6e75e to your computer and use it in GitHub Desktop.
Insert datetime with Karabiner
rules: [
{
"description": "hyper + d inserts datetime",
"manipulators": [
{
"from": {
"key_code": "d",
"modifiers": {
"mandatory": [
"left_shift",
"left_command",
"left_control",
"left_option"
]
}
},
"to": [
{
"shell_command": "osascript -e \"tell application \\\"System Events\\\" to keystroke \\\"$(date $@ +'%Y-%m-%d %H:%M:%S %Z')\\\"\""
}
],
"type": "basic"
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment