diff --git a/example/config.kdl b/example/config.kdl index 9689be1ba..b54fe1724 100644 --- a/example/config.kdl +++ b/example/config.kdl @@ -126,6 +126,7 @@ keybinds { bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } bind "o" { FocusNextPane; } bind "d" { Detach; } + bind "x" { CloseFocus; SwitchToMode "Normal"; } } shared_except "locked" { bind "Ctrl g" { SwitchToMode "Locked"; } diff --git a/example/default.kdl b/example/default.kdl index 2397f5bae..248b4026c 100644 --- a/example/default.kdl +++ b/example/default.kdl @@ -130,6 +130,7 @@ keybinds { bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } bind "o" { FocusNextPane; } bind "d" { Detach; } + bind "x" { CloseFocus; SwitchToMode "Normal"; } } shared_except "locked" { bind "Ctrl g" { SwitchToMode "Locked"; } diff --git a/zellij-utils/assets/config/default.kdl b/zellij-utils/assets/config/default.kdl index 2397f5bae..248b4026c 100644 --- a/zellij-utils/assets/config/default.kdl +++ b/zellij-utils/assets/config/default.kdl @@ -130,6 +130,7 @@ keybinds { bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } bind "o" { FocusNextPane; } bind "d" { Detach; } + bind "x" { CloseFocus; SwitchToMode "Normal"; } } shared_except "locked" { bind "Ctrl g" { SwitchToMode "Locked"; } diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap index 8d946d7b1..2ccadb3ce 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/setup.rs -assertion_line: 582 expression: "format!(\"{:#?}\", config)" --- Config { @@ -3124,6 +3123,14 @@ Config { Normal, ), ], + Char( + 'x', + ): [ + CloseFocus, + SwitchToMode( + Normal, + ), + ], Char( 'z', ): [ diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap index 97fb9f812..6bc0fbbac 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/setup.rs -assertion_line: 640 expression: "format!(\"{:#?}\", config)" --- Config { @@ -3124,6 +3123,14 @@ Config { Normal, ), ], + Char( + 'x', + ): [ + CloseFocus, + SwitchToMode( + Normal, + ), + ], Char( 'z', ): [ diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_plugins_override_config_plugins.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_plugins_override_config_plugins.snap index f10605129..d2391eddb 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_plugins_override_config_plugins.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_plugins_override_config_plugins.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/setup.rs -assertion_line: 668 expression: "format!(\"{:#?}\", config)" --- Config { @@ -3124,6 +3123,14 @@ Config { Normal, ), ], + Char( + 'x', + ): [ + CloseFocus, + SwitchToMode( + Normal, + ), + ], Char( 'z', ): [ diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap index 13c499ddb..a69286fee 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/setup.rs -assertion_line: 682 expression: "format!(\"{:#?}\", config)" --- Config { @@ -3124,6 +3123,14 @@ Config { Normal, ), ], + Char( + 'x', + ): [ + CloseFocus, + SwitchToMode( + Normal, + ), + ], Char( 'z', ): [ diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap index fc47de232..dc086ff09 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/setup.rs -assertion_line: 654 expression: "format!(\"{:#?}\", config)" --- Config { @@ -3124,6 +3123,14 @@ Config { Normal, ), ], + Char( + 'x', + ): [ + CloseFocus, + SwitchToMode( + Normal, + ), + ], Char( 'z', ): [