summaryrefslogtreecommitdiffstats
path: root/src/configs/conda.rs
diff options
context:
space:
mode:
authorAppleTheGolden <scotsbox@protonmail.com>2019-10-05 20:25:25 +0200
committerKevin Song <chipbuster@users.noreply.github.com>2019-10-05 13:25:25 -0500
commit7657af068070b166bf468909bc1c71e8d9ff1b41 (patch)
tree0f0b534f40170d52f0ee0b05b1a0dbdddacee0c3 /src/configs/conda.rs
parente911e76e6bb79788c2d614718a53bb9082f05103 (diff)
feat: Add conda module (#469)
Diffstat (limited to 'src/configs/conda.rs')
-rw-r--r--src/configs/conda.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/configs/conda.rs b/src/configs/conda.rs
new file mode 100644
index 000000000..7ce644683
--- /dev/null
+++ b/src/configs/conda.rs
@@ -0,0 +1,29 @@
+use crate::config::{ModuleConfig, RootModuleConfig, SegmentConfig};
+
+use ansi_term::{Color, Style};
+use starship_module_config_derive::ModuleConfig;
+
+#[derive(Clone, ModuleConfig)]
+pub struct CondaConfig<'a> {
+ pub symbol: SegmentConfig<'a>,
+ pub environment: SegmentConfig<'a>,
+ pub style: Style,
+ pub disabled: bool,
+}
+
+impl<'a> RootModuleConfig<'a> for CondaConfig<'a> {
+ fn new() -> Self {
+ CondaConfig {
+ symbol: SegmentConfig {
+ value: "C ",
+ style: None,
+ },
+ environment: SegmentConfig {
+ value: "",
+ style: None,
+ },
+ style: Color::Green.bold(),
+ disabled: false,
+ }
+ }
+}