aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input
diff options
context:
space:
mode:
authorMarcel Baur <mail@marcelbaur.io>2023-03-30 13:33:39 +0200
committerGitHub <noreply@github.com>2023-03-30 20:33:39 +0900
commit6ea5c3666fa2f38742da115d5fe5beef30eccc2f (patch)
tree7e9445b1be581826c3cec0984034ebe04b47ead2 /zellij-utils/src/input
parentAdd 'launch in xonsh' in README (#2323) (diff)
downloadsl0ppij-6ea5c3666fa2f38742da115d5fe5beef30eccc2f.tar.gz
sl0ppij-6ea5c3666fa2f38742da115d5fe5beef30eccc2f.tar.xz
sl0ppij-6ea5c3666fa2f38742da115d5fe5beef30eccc2f.zip
Add option to hide session name in tab-bar (deriving from #2172) (#2301)
* feat(tab-bar): add option to hide prefix (#2172) * feat(tab-bar): only hide session_name * fix(snapshots): update snapshots with new config-var naming --------- Co-authored-by: Marcel Baur <marcel@baur.gg>
Diffstat (limited to 'zellij-utils/src/input')
-rw-r--r--zellij-utils/src/input/config.rs2
-rw-r--r--zellij-utils/src/input/theme.rs2
2 files changed, 4 insertions, 0 deletions
diff --git a/zellij-utils/src/input/config.rs b/zellij-utils/src/input/config.rs
index 5cdc509f..9d0c6da3 100644
--- a/zellij-utils/src/input/config.rs
+++ b/zellij-utils/src/input/config.rs
@@ -639,6 +639,7 @@ mod config_test {
ui {
pane_frames {
rounded_corners true
+ hide_session_name true
}
}
"#;
@@ -646,6 +647,7 @@ mod config_test {
let expected_ui_config = UiConfig {
pane_frames: FrameConfig {
rounded_corners: true,
+ hide_session_name: true,
},
};
assert_eq!(config.ui, expected_ui_config, "Ui config defined in config");
diff --git a/zellij-utils/src/input/theme.rs b/zellij-utils/src/input/theme.rs
index c76deb31..bf0edf23 100644
--- a/zellij-utils/src/input/theme.rs
+++ b/zellij-utils/src/input/theme.rs
@@ -25,12 +25,14 @@ impl UiConfig {
#[derive(Debug, Default, Clone, Copy, PartialEq, Deserialize, Serialize)]
pub struct FrameConfig {
pub rounded_corners: bool,
+ pub hide_session_name: bool,
}
impl FrameConfig {
pub fn merge(&self, other: FrameConfig) -> Self {
let mut merged = self.clone();
merged.rounded_corners = other.rounded_corners;
+ merged.hide_session_name = other.hide_session_name;
merged
}
}