Skip to content

Instantly share code, notes, and snippets.

@svallory
Created September 17, 2023 01:31
Show Gist options
  • Save svallory/0cc08750e5ae837adad3ee3dde3599c9 to your computer and use it in GitHub Desktop.
Save svallory/0cc08750e5ae837adad3ee3dde3599c9 to your computer and use it in GitHub Desktop.
Quake-style Hotkey Window for Wezterm
{
"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$"]
}
]
}
]
}
]
}
@surgiie
Copy link

surgiie commented Feb 4, 2025

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 😅 )

@in0vik
Copy link

in0vik commented Mar 11, 2025

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