summaryrefslogtreecommitdiffstats
path: root/src/modules/battery.rs
diff options
context:
space:
mode:
authorTiffany Le-Nguyen <letiffany.nguyen@gmail.com>2019-07-19 16:18:52 -0400
committerMatan Kushner <hello@matchai.me>2019-07-19 16:18:52 -0400
commit08cf33522af2dde17de6645ce2015fa4e87a6a68 (patch)
tree0330aab2abf5ee9d22e28ac5179838b6bbc9a7b2 /src/modules/battery.rs
parent025c0e5e8530ee1f53d2a45cd1d1de437cc2e819 (diff)
docs: Add vuepress with initial docs (#99)
Co-authored-by: Tiffany Le-Nguyen <tlenguyen@expedia.com> Co-authored-by: Matan Kushner <hello@matchai.me>
Diffstat (limited to 'src/modules/battery.rs')
-rw-r--r--src/modules/battery.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/battery.rs b/src/modules/battery.rs
index 586153266..78ea1813d 100644
--- a/src/modules/battery.rs
+++ b/src/modules/battery.rs
@@ -2,7 +2,7 @@ use ansi_term::Color;
use super::{Context, Module};
-/// Creates a segment for the battery percentage and charging state
+/// Creates a module for the battery percentage and charging state
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
const BATTERY_FULL: &str = "•";
const BATTERY_CHARGING: &str = "⇡";
@@ -28,13 +28,13 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
match state {
battery::State::Full => {
- module.new_segment("full", BATTERY_FULL);
+ module.new_segment("full_symbol", BATTERY_FULL);
}
battery::State::Charging => {
- module.new_segment("charging", BATTERY_CHARGING);
+ module.new_segment("charging_symbol", BATTERY_CHARGING);
}
battery::State::Discharging => {
- module.new_segment("discharging", BATTERY_DISCHARGING);
+ module.new_segment("discharging_symbol", BATTERY_DISCHARGING);
}
_ => return None,
}