diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-04-25 17:32:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 17:32:31 -0400 |
commit | 3a6f7a67503275fcc51e2a78ebb3811a9d2f05ef (patch) | |
tree | 9e319aae3497011a0616a1933e07d681fa9daf74 /src/constants.rs | |
parent | 863e780f2f8f09fb7244bcf9819694f50cc1a400 (diff) |
refactor: changed how we set help text on resize and init
Diffstat (limited to 'src/constants.rs')
-rw-r--r-- | src/constants.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/constants.rs b/src/constants.rs index dca06781..7db7f535 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -36,8 +36,6 @@ lazy_static! { } // Help text -pub const NUM_CATEGORIES: u16 = 6; - pub const HELP_CONTENTS_TEXT: [&str; 6] = [ "Press the corresponding numbers to jump to the section, or scroll:\n", "1 - General bindings\n", @@ -108,6 +106,17 @@ pub const BATTERY_HELP_TEXT: [&str; 3] = [ "Right Go to next battery", ]; +lazy_static! { + pub static ref HELP_TEXT: Vec<Vec<&'static str>> = vec![ + HELP_CONTENTS_TEXT.to_vec(), + GENERAL_HELP_TEXT.to_vec(), + CPU_HELP_TEXT.to_vec(), + PROCESS_HELP_TEXT.to_vec(), + SEARCH_HELP_TEXT.to_vec(), + BATTERY_HELP_TEXT.to_vec(), + ]; +} + // Config and flags pub const DEFAULT_UNIX_CONFIG_FILE_PATH: &str = ".config/bottom/bottom.toml"; pub const DEFAULT_WINDOWS_CONFIG_FILE_PATH: &str = "bottom/bottom.toml"; |