This commit is contained in:
sxyazi 2023-08-30 20:43:50 +08:00
parent 44abc4c997
commit 5c5846a07b
No known key found for this signature in database
2 changed files with 11 additions and 5 deletions

View file

@ -17,9 +17,15 @@ impl Widget for Bindings<'_> {
return;
}
let col1 = bindings.iter().map(|c| ListItem::new(c.on())).collect::<Vec<_>>();
let col1 = bindings
.iter()
.map(|c| ListItem::new(c.on()).style(Style::new().fg(Color::Yellow)))
.collect::<Vec<_>>();
let col2 = bindings.iter().map(|c| ListItem::new(c.exec())).collect::<Vec<_>>();
let col2 = bindings
.iter()
.map(|c| ListItem::new(c.exec()).style(Style::new().fg(Color::Cyan)))
.collect::<Vec<_>>();
let col3 = bindings
.iter()
@ -34,7 +40,7 @@ impl Widget for Bindings<'_> {
let cursor = self.cx.help.rel_cursor() as u16;
buf.set_style(
Rect { x: area.x, y: area.y + cursor, width: area.width, height: 1 },
Style::new().bg(Color::Blue).fg(Color::Black).bold(),
Style::new().bg(Color::Black).bold(),
);
List::new(col1).render(chunks[0], buf);

View file

@ -35,9 +35,9 @@ keymap = [
# Operation
{ on = [ "o" ], exec = "open", desc = "Open the selected files" },
{ on = [ "O" ], exec = "open --interactive", desc = "Open the selected files with an interactive UI to choose the opening method" },
{ on = [ "O" ], exec = "open --interactive", desc = "Open the selected files interactively" },
{ on = [ "<Enter>" ], exec = "open", desc = "Open the selected files" },
{ on = [ "<C-Enter>" ], exec = "open --interactive", desc = "Open the selected files with an interactive UI to choose the opening method" }, # It's cool if you're using a terminal that supports CSI u
{ on = [ "<C-Enter>" ], exec = "open --interactive", desc = "Open the selected files interactively" }, # It's cool if you're using a terminal that supports CSI u
{ on = [ "y" ], exec = "yank", desc = "Copy the selected files" },
{ on = [ "x" ], exec = "yank --cut", desc = "Cut the selected files" },
{ on = [ "p" ], exec = "paste", desc = "Paste the files" },