WindTerm
WindTerm copied to clipboard
Keymap change "Window.ShowPane*" to "Window.TogglePane*"
Hello! Could you replace behavior "Show" with "Toggle"? Shortcut only opens pane, does not close it, and it is not too convenient. Or add new class of "TogglePane" shortcuts. For example "Window.ShowPaneSession" -> "Window.TogglePaneSession" Thanks!
Sure, I will evaluate this requirement and implement it in 2.5.0
version if possible. The reason why the shortcut key can only open and not close the pane
is because I am worried that someone may accidentally close the pane
by pressing the shortcut key multiple times.
BTW: You can also do this yourself by following the steps below:
- Open
WindTerm_installed_path/global/wind.actions
and insert:
"Window.TogglePaneExplorer" : {
"text" : "Toggle &Explorer",
"icon" : "king::explorerPane",
"script" : "() => {
if (window.activeKit.isPaneVisible('ExplorerPane')) {
window.activeKit.hidePane('ExplorerPane');
} else {
window.activeKit.showPane('ExplorerPane');
}
}"
},
- Open
WindTerm_installed_path/global/wind.keymaps
and change:
{ "keys": "<Alt+W><Alt+E>",
"when": "window.isScope('terminal.*')",
"action": "Window.ShowPaneExplorer"
},
to:
{ "keys": "<Alt+W><Alt+E>",
"when": "window.isScope('terminal.*')",
"action": "Window.TogglePaneExplorer"
},
- Done.
Thank you for your answers! What was done:
- created file
WindTerm_installed_path\.wind\profiles\default.v10\user.actions
with content:
{
"Window.TogglePaneSession" : {
"text" : "Toggle &Session",
"icon" : "king::sessionPane",
"script" : "() => {
if (window.activeKit.isPaneVisible('SessionPane')) {
window.activeKit.hidePane('SessionPane');
} else {
window.activeKit.showPane('SessionPane');
}
}"
}
}
- replaced in
WindTerm_installed_path\.wind\profiles\default.v10\user.keymaps
{ "keys": "<Alt+S>",
"when": "window.isScope('terminal.*')",
"action": "Window.ShowPaneSession"
},
with
{ "keys": "<Alt+S>",
"when": "window.isScope('terminal.*')",
"action": "Window.TogglePaneSession"
},
Results of experiments:
- I toggle session pane with Alt+S, pane opens (right)
- I toggle session pane with Alt+S, pane remains in its place, but empty (wrong)
What I expected to see:
Could you make pane hide when it becomes empty (when all panes inside it are "unchecked")?
Or am I doing something wrong?