mirror of
https://github.com/bobwen-dev/hunter
synced 2025-04-12 00:55:41 +02:00
evil keybinds ;)
This commit is contained in:
parent
e4a2749ee0
commit
0cb4fa89b5
@ -844,14 +844,14 @@ impl Widget for FileBrowser {
|
||||
match key {
|
||||
Key::Char('/') => { self.turbo_cd()?; },
|
||||
Key::Char('Q') => { self.quit_with_dir()?; },
|
||||
Key::Right | Key::Char('f') => { self.enter_dir()?; },
|
||||
Key::Right | Key::Char('l') => { self.enter_dir()?; },
|
||||
Key::Char('F') => { self.open_bg()?; },
|
||||
Key::Left | Key::Char('b') => { self.go_back()?; },
|
||||
Key::Left | Key::Char('h') => { self.go_back()?; },
|
||||
Key::Char('-') => { self.goto_prev_cwd()?; },
|
||||
Key::Char('`') => { self.goto_bookmark()?; },
|
||||
Key::Char('m') => { self.add_bookmark()?; },
|
||||
Key::Char('w') => { self.proc_view.lock()?.popup()?; },
|
||||
Key::Char('l') => self.log_view.lock()?.popup()?,
|
||||
Key::Char('L') => self.log_view.lock()?.popup()?,
|
||||
Key::Char('z') => self.run_subshell()?,
|
||||
Key::Char('c') => self.toggle_colums(),
|
||||
_ => { self.main_widget_mut()?.on_key(key)?; },
|
||||
|
@ -285,10 +285,10 @@ where
|
||||
|
||||
fn on_key(&mut self, key: Key) -> HResult<()> {
|
||||
match key {
|
||||
Key::Up | Key::Char('p') => self.move_up(),
|
||||
Key::Char('P') => for _ in 0..10 { self.move_up() },
|
||||
Key::Char('N') => for _ in 0..10 { self.move_down() },
|
||||
Key::Down | Key::Char('n') => self.move_down(),
|
||||
Key::Up | Key::Char('k') => self.move_up(),
|
||||
Key::Char('K') => for _ in 0..10 { self.move_up() },
|
||||
Key::Char('J') => for _ in 0..10 { self.move_down() },
|
||||
Key::Down | Key::Char('j') => self.move_down(),
|
||||
Key::Char('t') => self.toggle_fold()?,
|
||||
Key::Char('l') => self.popup_finnished()?,
|
||||
_ => {}
|
||||
|
@ -40,13 +40,13 @@ impl Listable for ListView<Files> {
|
||||
|
||||
fn on_key(&mut self, key: Key) -> HResult<()> {
|
||||
match key {
|
||||
Key::Up | Key::Char('p') => {
|
||||
Key::Up | Key::Char('k') => {
|
||||
self.move_up();
|
||||
self.refresh()?;
|
||||
}
|
||||
Key::Char('P') => { for _ in 0..10 { self.move_up() } self.refresh()?; }
|
||||
Key::Char('N') => { for _ in 0..10 { self.move_down() } self.refresh()?; }
|
||||
Key::Down | Key::Char('n') => {
|
||||
Key::Char('K') => { for _ in 0..10 { self.move_up() } self.refresh()?; }
|
||||
Key::Char('J') => { for _ in 0..10 { self.move_down() } self.refresh()?; }
|
||||
Key::Down | Key::Char('j') => {
|
||||
self.move_down();
|
||||
self.refresh()?;
|
||||
},
|
||||
@ -60,8 +60,8 @@ impl Listable for ListView<Files> {
|
||||
Key::Char('h') => self.toggle_hidden(),
|
||||
Key::Char('r') => self.reverse_sort(),
|
||||
Key::Char('s') => self.cycle_sort(),
|
||||
Key::Char('K') => self.select_next_mtime(),
|
||||
Key::Char('k') => self.select_prev_mtime(),
|
||||
Key::Char('N') => self.select_next_mtime(),
|
||||
Key::Char('n') => self.select_prev_mtime(),
|
||||
Key::Char('d') => self.toggle_dirs_first(),
|
||||
_ => { self.bad(Event::Key(key))?; }
|
||||
}
|
||||
|
@ -547,17 +547,17 @@ impl Widget for ProcView {
|
||||
fn on_key(&mut self, key: Key) -> HResult<()> {
|
||||
match key {
|
||||
Key::Char('w') => { return Err(HError::PopupFinnished) }
|
||||
Key::Char('d') => { self.remove_proc()? }
|
||||
Key::Char('k') => { self.get_listview_mut().kill_proc()? }
|
||||
Key::Up | Key::Char('p') => {
|
||||
Key::Char('D') => { self.remove_proc()? }
|
||||
Key::Char('d') => { self.get_listview_mut().kill_proc()? }
|
||||
Key::Up | Key::Char('k') => {
|
||||
self.get_listview_mut().move_up();
|
||||
}
|
||||
Key::Down | Key::Char('n') => {
|
||||
Key::Down | Key::Char('j') => {
|
||||
self.get_listview_mut().move_down();
|
||||
}
|
||||
Key::Char('f') => { self.toggle_follow().log(); }
|
||||
Key::Ctrl('n') => { self.scroll_down().log(); },
|
||||
Key::Ctrl('p') => { self.scroll_up().log(); },
|
||||
Key::Ctrl('j') => { self.scroll_down().log(); },
|
||||
Key::Ctrl('k') => { self.scroll_up().log(); },
|
||||
Key::Ctrl('v') => { self.page_down().log(); },
|
||||
Key::Alt('v') => { self.page_up().log(); },
|
||||
Key::Char('>') => { self.scroll_bottom().log(); },
|
||||
|
Loading…
x
Reference in New Issue
Block a user