aboutsummaryrefslogtreecommitdiff
path: root/src/tui/ui.rs
diff options
context:
space:
mode:
authorlukeflo2025-06-28 12:45:21 +0200
committerlukeflo2025-06-28 12:45:21 +0200
commit5700c16b9dd2a964d071dcae4de5baa896bc2d20 (patch)
tree9bf7e4416387839229174476e6c6c35ab6aa022c /src/tui/ui.rs
parent3bc409fa5627cb2fd2dd1bd885f471e4aab21478 (diff)
downloadbibiman-5700c16b9dd2a964d071dcae4de5baa896bc2d20.tar.gz
bibiman-5700c16b9dd2a964d071dcae4de5baa896bc2d20.zip
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
Diffstat (limited to 'src/tui/ui.rs')
-rw-r--r--src/tui/ui.rs10
1 files changed, 9 insertions, 1 deletions
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()