Created
September 17, 2023 01:31
-
-
Save svallory/0cc08750e5ae837adad3ee3dde3599c9 to your computer and use it in GitHub Desktop.
Quake-style Hotkey Window for Wezterm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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$"] | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
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"
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 😅 )