From 5700c16b9dd2a964d071dcae4de5baa896bc2d20 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sat, 28 Jun 2025 12:45:21 +0200 Subject: add shortcuts for opening files/links and yanking citekey + `o-o`|`o-l` -> shortcut for opening first file/link of current entry + `y-y` -> shortcut for yanking citekey of current entry --- src/tui/ui.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/tui/ui.rs') diff --git a/src/tui/ui.rs b/src/tui/ui.rs index 7a121bf..ebebe4c 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -299,9 +299,17 @@ pub fn render_popup(app: &mut App, cfg: &BibiConfig, frame: &mut Frame) { " Select " }; + let bottom_info = if let Some(PopupKind::OpenRes) = app.bibiman.popup_area.popup_kind { + " (j,k|↓,↑) ━ (o,l) ━ (ENTER) ━ (ESC) ".bold() + } else if let Some(PopupKind::YankItem) = app.bibiman.popup_area.popup_kind { + " (j,k|↓,↑) ━ (y) ━ (ENTER) ━ (ESC) ".bold() + } else { + " (j,k|↓,↑) ━ (ENTER) ━ (ESC) ".bold() + }; + let block = Block::bordered() .title_top(title.bold()) - .title_bottom(" (j,k|↓,↑) ━ (ENTER) ━ (ESC) ".bold()) + .title_bottom(bottom_info) .title_alignment(Alignment::Center) .style( Style::new() -- cgit v1.2.3