aboutsummaryrefslogtreecommitdiff
path: root/src/app/input/navigate.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-15 03:58:07 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-15 04:02:14 +0300
commit2c7c8beb079c5fd58a2e53efd2058df050ad9f55 (patch)
tree6756f671dc728d915b1d6ebececa8cf7f70b66fb /src/app/input/navigate.rs
parent88370e1516182ab519d22a12fa82d5780a40fee6 (diff)
feat: add floating popup panes
refs #1125
Diffstat (limited to 'src/app/input/navigate.rs')
-rw-r--r--src/app/input/navigate.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/app/input/navigate.rs b/src/app/input/navigate.rs
index 7f98f530..33177624 100644
--- a/src/app/input/navigate.rs
+++ b/src/app/input/navigate.rs
@@ -778,6 +778,7 @@ impl App {
crate::config::CustomCommandAction::Pane => {
self.spawn_pane_command(&binding.command, Vec::new())
}
+ crate::config::CustomCommandAction::Popup => self.spawn_custom_popup_command(&binding),
crate::config::CustomCommandAction::PluginAction => self
.invoke_plugin_action_from_keybind(binding.command.clone())
.map_err(std::io::Error::other),
@@ -798,6 +799,21 @@ impl App {
}
}
+ fn spawn_custom_popup_command(
+ &mut self,
+ binding: &crate::config::CustomCommandKeybind,
+ ) -> io::Result<()> {
+ self.spawn_popup_shell_command(
+ &binding.command,
+ None,
+ self.custom_command_env().0,
+ crate::app::popup::PopupGeometry {
+ width: binding.width,
+ height: binding.height,
+ },
+ )
+ }
+
fn custom_command_env(&self) -> (Vec<(String, String)>, Option<std::path::PathBuf>) {
let mut env = vec![(
crate::api::SOCKET_PATH_ENV_VAR.to_string(),
@@ -2956,6 +2972,8 @@ navigate_pane_down = "ctrl+j"
command,
action: crate::config::CustomCommandAction::Shell,
description: None,
+ width: None,
+ height: None,
}];
app.handle_key(TerminalKey::new(
@@ -3048,6 +3066,8 @@ navigate_pane_down = "ctrl+j"
command,
action: crate::config::CustomCommandAction::Pane,
description: None,
+ width: None,
+ height: None,
}];
app.handle_key(TerminalKey::new(