aboutsummaryrefslogtreecommitdiffstats
path: root/src/widgets/session.rs
blob: 4c4ca1ce2f307f380f7bf1a42a17d5d11b085311 (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 super::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: crate::ZellijState) -> String {
        match state.mode.session_name {
            Some(name) => name,
            None => "".to_string(),
        }
    }

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