mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-21 19:53:05 +00:00
refactor: move around some configuration code again (#1371)
This commit is contained in:
parent
228da99489
commit
c242b4aff3
8 changed files with 1155 additions and 1153 deletions
|
@ -20,7 +20,7 @@ use bottom::{
|
|||
create_or_get_config,
|
||||
data_conversion::*,
|
||||
handle_key_event_or_break, handle_mouse_event,
|
||||
options::config::{get_color_scheme, get_widget_layout, init_app},
|
||||
options::{get_color_scheme, get_widget_layout, init_app},
|
||||
panic_hook, read_config, try_drawing, update_data, BottomEvent,
|
||||
};
|
||||
use crossterm::{
|
||||
|
|
|
@ -5,7 +5,7 @@ use tui::style::{Color, Style};
|
|||
use super::ColourScheme;
|
||||
use crate::{
|
||||
constants::*,
|
||||
options::config::{Config, ConfigColours},
|
||||
options::{Config, ConfigColours},
|
||||
utils::error,
|
||||
};
|
||||
mod colour_utils;
|
||||
|
@ -238,7 +238,7 @@ mod test {
|
|||
use tui::style::{Color, Style};
|
||||
|
||||
use super::{CanvasStyling, ColourScheme};
|
||||
use crate::Config;
|
||||
use crate::options::Config;
|
||||
|
||||
#[test]
|
||||
fn default_selected_colour_works() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use tui::widgets::Borders;
|
||||
|
||||
use crate::options::config::ConfigColours;
|
||||
use crate::options::ConfigColours;
|
||||
|
||||
// Default widget ID
|
||||
pub const DEFAULT_WIDGET_ID: u64 = 56709;
|
||||
|
|
|
@ -60,7 +60,7 @@ use crossterm::{
|
|||
};
|
||||
use data_conversion::*;
|
||||
pub use options::args;
|
||||
use options::config::Config;
|
||||
use options::Config;
|
||||
use utils::error;
|
||||
#[allow(unused_imports)]
|
||||
pub use utils::logging::*;
|
||||
|
|
1146
src/options.rs
1146
src/options.rs
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@ use crate::{
|
|||
},
|
||||
data_collection::cpu::CpuDataType,
|
||||
data_conversion::CpuWidgetData,
|
||||
options::config::CpuDefault,
|
||||
options::config::cpu::CpuDefault,
|
||||
utils::general::truncate_to_text,
|
||||
};
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ use bottom::constants::DEFAULT_BATTERY_LAYOUT;
|
|||
use bottom::{
|
||||
app::layout_manager::{BottomLayout, BottomWidgetType},
|
||||
constants::{DEFAULT_LAYOUT, DEFAULT_WIDGET_ID},
|
||||
options::config::{layout::Row, Config},
|
||||
options::{config::layout::Row, Config},
|
||||
utils::error,
|
||||
};
|
||||
use toml_edit::de::from_str;
|
||||
|
|
Loading…
Reference in a new issue