mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
44abc4c997
commit
5c5846a07b
2 changed files with 11 additions and 5 deletions
|
|
@ -17,9 +17,15 @@ impl Widget for Bindings<'_> {
|
||||||
return;
|
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
|
let col3 = bindings
|
||||||
.iter()
|
.iter()
|
||||||
|
|
@ -34,7 +40,7 @@ impl Widget for Bindings<'_> {
|
||||||
let cursor = self.cx.help.rel_cursor() as u16;
|
let cursor = self.cx.help.rel_cursor() as u16;
|
||||||
buf.set_style(
|
buf.set_style(
|
||||||
Rect { x: area.x, y: area.y + cursor, width: area.width, height: 1 },
|
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);
|
List::new(col1).render(chunks[0], buf);
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ keymap = [
|
||||||
|
|
||||||
# Operation
|
# Operation
|
||||||
{ on = [ "o" ], exec = "open", desc = "Open the selected files" },
|
{ 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 = [ "<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 = [ "y" ], exec = "yank", desc = "Copy the selected files" },
|
||||||
{ on = [ "x" ], exec = "yank --cut", desc = "Cut the selected files" },
|
{ on = [ "x" ], exec = "yank --cut", desc = "Cut the selected files" },
|
||||||
{ on = [ "p" ], exec = "paste", desc = "Paste the files" },
|
{ on = [ "p" ], exec = "paste", desc = "Paste the files" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue