summaryrefslogtreecommitdiffstats
path: root/src/options.rs
diff options
context:
space:
mode:
authorClementTsang <cjhtsang@uwaterloo.ca>2020-04-27 15:52:39 -0400
committerClementTsang <cjhtsang@uwaterloo.ca>2020-04-27 15:56:39 -0400
commit8e4f6a3a02401bd7625e4ce7e087adc0750a538e (patch)
treef2b2fd70c65ffb594807dadedec879699d8e9d93 /src/options.rs
parent8534d42f1be01cf8da8176036112a9405bd03217 (diff)
feature: add battery flag
Diffstat (limited to 'src/options.rs')
-rw-r--r--src/options.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/options.rs b/src/options.rs
index 7351f4c4..d7a32f1f 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -262,7 +262,7 @@ pub fn get_widget_layout(
let bottom_layout = if get_use_basic_mode(matches, config) {
default_widget_id = DEFAULT_WIDGET_ID;
- BottomLayout::init_basic_default()
+ BottomLayout::init_basic_default(get_use_battery(matches, config))
} else if let Some(rows) = &config.row {
let mut iter_id = 0; // A lazy way of forcing unique IDs *shrugs*
let mut total_height_ratio = 0;
@@ -284,7 +284,7 @@ pub fn get_widget_layout(
total_row_height_ratio: total_height_ratio,
};
- // Confirm that we have at least ONE widget - if we don't, go back to default!
+ // Confirm that we have at least ONE widget - if not, error out!
if iter_id > 0 {
ret_bottom_layout.get_movement_mappings();
ret_bottom_layout
@@ -295,7 +295,7 @@ pub fn get_widget_layout(
}
} else {
default_widget_id = DEFAULT_WIDGET_ID;
- BottomLayout::init_default(left_legend)
+ BottomLayout::init_default(left_legend, get_use_battery(matches, config))
};
Ok((bottom_layout, default_widget_id))