diff options
author | Shav Kinderlehrer <[email protected]> | 2024-07-23 17:48:28 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2024-07-23 17:48:28 -0400 |
commit | dc0f2ce9ba97ebb47e05b80a511da6eb29818b63 (patch) | |
tree | dc83035069f5a015047be1ca3da6f65781eb4695 /src/main.rs | |
parent | f638f4bd1e3a03bc2bdd5f9dcd57d4830fd3c553 (diff) | |
download | molehole-dc0f2ce9ba97ebb47e05b80a511da6eb29818b63.tar.gz molehole-dc0f2ce9ba97ebb47e05b80a511da6eb29818b63.zip |
Merge old-moleholencurses
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 3b8bb70..0000000 --- a/src/main.rs +++ /dev/null @@ -1,59 +0,0 @@ -mod app; -mod app_action; -mod app_event; -mod component; -mod components; -mod keys; -mod tui; - -use eyre::Result; - -use app_action::AppAction; -use keys::key_commands::KeyCommand; - -fn main() -> Result<()> { - tui::install_hooks()?; - let mut app = app::App::new(std::time::Duration::from_millis(10))?; - let mut key_commands = vec![ - // Status bar - KeyCommand { - key_code: "o".to_string(), - description: "Open new link".to_string(), - action: AppAction::OpenUrl, - }, - // Navigation - KeyCommand { - key_code: "g".to_string(), - description: "Scroll to top".to_string(), - action: AppAction::ScrollTop, - }, - KeyCommand { - key_code: "G".to_string(), - description: "Scroll to bottom".to_string(), - action: AppAction::ScrollBottom, - }, - KeyCommand { - key_code: "k".to_string(), - description: "Scroll up one line".to_string(), - action: AppAction::ScrollUp, - }, - KeyCommand { - key_code: "j".to_string(), - description: "Scroll down one line".to_string(), - action: AppAction::ScrollDown, - }, - KeyCommand { - key_code: "q".to_string(), - description: "Quit molehole".to_string(), - action: AppAction::Quit, - }, - KeyCommand { - key_code: "?".to_string(), - description: "Toggle help menu".to_string(), - action: AppAction::ShowHelpMenu, - }, - ]; - app.key_commands.append(&mut key_commands); - - app.run() -} |