gogocome
2022-04-26 16:49:34 +08:00
撸了个 karabiner 的:
```
{
"description": "Open current dir in VsCode",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com.apple.finder"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "r",
"modifiers": {
"mandatory": [
"left_command"
]
}
},
"to": [
{
"shell_command": "osascript -e '\ntell application \"Finder\"\n if exists Finder window 1 then\n set currentFolder to target of Finder window 1 as alias\n else\n return\n end if\nend tell\ntell application \"Visual Studio Code\" to open currentFolder\n'"
}
],
"type": "basic"
}
]
},
```