summaryrefslogtreecommitdiffstats
path: root/src/configs/hostname.rs
blob: ff57a6961f392eff4b0314bbdceb01b0b11c504c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::config::{ModuleConfig, RootModuleConfig};

use starship_module_config_derive::ModuleConfig;

#[derive(Clone, ModuleConfig)]
pub struct HostnameConfig<'a> {
    pub ssh_only: bool,
    pub trim_at: &'a str,
    pub format: &'a str,
    pub style: &'a str,
    pub disabled: bool,
}

impl<'a> RootModuleConfig<'a> for HostnameConfig<'a> {
    fn new() -> Self {
        HostnameConfig {
            ssh_only: true,
            trim_at: ".",
            format: "[$hostname]($style) in ",
            style: "green dimmed bold",
            disabled: false,
        }
    }
}