-
-
Save svallory/0cc08750e5ae837adad3ee3dde3599c9 to your computer and use it in GitHub Desktop.
{ | |
"title": "Quake-style Hotkey Window for Wezterm", | |
"rules": [ | |
{ | |
"description": "Launch/show Wezterm if it is not in foreground", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "escape", | |
"modifiers": { | |
"mandatory": ["control"] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "open '/Applications/WezTerm.app'" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_unless", | |
"bundle_identifiers": ["^com\\.github\\.wez\\.wezterm$"] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Minimize Wezterm if it is in foreground", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "escape", | |
"modifiers": { | |
"mandatory": ["control"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "h", | |
"modifiers": ["command"] | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": ["^com\\.github\\.wez\\.wezterm$"] | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
What is this for? Wezterm uses Lua for configuration... and this is obviously JSON.
Oh… I wasn't expecting anyone to find this :)
This is a rule configuration for Karabiner
Thanks!
Thanks!
You are welcome! :)
Hi! I'm getting an error when trying to create a new Karabiner rule:
Any ideas why Karabiner thinks the manipulators field might be empty? Is this working with latest version of Karabiner for you (at the time of writing 15.0.0)? If not, have you moved to a different solution?
Many thanks in advance!
Hi! I'm getting an error when trying to create a new Karabiner rule:
Any ideas why Karabiner thinks the manipulators field might be empty? Is this working with latest version of Karabiner for you (at the time of writing 15.0.0)? If not, have you moved to a different solution?
Many thanks in advance!
Hello, a bit late but the format used here is to define a set of rules, and outside of importing I haven't found how to make Karabiner take a whole set of rules from a json. If you take the two rules separately (from {description... until the } before the next {description...) it will work !
Posting this script in case its useful to anyone who was also hunting for this functionality on linux :
https://github.com/surgiie/quake
quake wezterm
It has some extra features for playing mp3 sounds during focus/hide. (I like to play the sound effect where navi the fairy hides/comes out of link's shield from the legend of zelda ocarina of time 😅 )
Here is toggle quake mode (§ button) for karabiner 15
{
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.github\\.wez\\.wezterm$"
],
"type": "frontmost_application_unless"
}
],
"description": "Launch/show WezTerm if it is not in foreground",
"from": {
"key_code": "non_us_backslash",
"modifiers": { "mandatory": [] }
},
"to": [{ "shell_command": "open -a '/Applications/WezTerm.app'" }],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.github\\.wez\\.wezterm$"
],
"type": "frontmost_application_if"
}
],
"description": "Hide WezTerm if it is in foreground",
"from": {
"key_code": "non_us_backslash",
"modifiers": { "mandatory": [] }
},
"to": [
{
"key_code": "h",
"modifiers": ["command"]
}
],
"type": "basic"
}
],
"title": "Toggle WezTerm with non_US_backslash"
}
What is this for? Wezterm uses Lua for configuration... and this is obviously JSON.