aboutsummaryrefslogtreecommitdiffstats
path: root/src/widgets/session.rs
blob: 4916a65e6e2e203eebba99605eca215268f4f2e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::collections::BTreeMap;

use crate::{config::ZellijState, widgets::widget::Widget};

pub struct SessionWidget {}

impl SessionWidget {
    pub fn new(_config: &BTreeMap<String, String>) -> Self {
        Self {}
    }
}

impl Widget for SessionWidget {
    fn process(&self, _name: &str, state: &ZellijState) -> String {
        match &state.mode.session_name {
            Some(name) => name.to_owned(),
            None => "".to_owned(),
        }
    }

    fn process_click(&self, _state: &ZellijState, _pos: usize) {}
}