diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-08-24 13:36:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 13:36:24 +0200 |
commit | bc628abc1266cdc0dbce4f19a89727527a3e39a8 (patch) | |
tree | 6a0fcac6ec35c71a237bca0128a57a5b40afb0e3 /zellij-utils/src/consts.rs | |
parent | bf3c072d6dd68da0abd838e95e6004091a4cd331 (diff) |
feat(sessions): add a session manager to switch between sessions, tabs and panes and create new ones (#2721)
* write/read session metadata to disk for all sessions
* switch session client side
* fix tests
* various adjustments
* fix full screen focus bug in tiled panes
* fix tests
* fix permission sorting issue
* cleanups
* add session manager
* fix tests
* various cleanups
* style(fmt): rustfmt
* clear screen before switching sessions
* I hate you clippy
* truncate controls line to width
* version session cache
* attempt to fix plugin tests
* style(fmt): rustfmt
* another attempt to fix the tests in the ci
Diffstat (limited to 'zellij-utils/src/consts.rs')
-rw-r--r-- | zellij-utils/src/consts.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/zellij-utils/src/consts.rs b/zellij-utils/src/consts.rs index a2c3a42a5..43990b4ba 100644 --- a/zellij-utils/src/consts.rs +++ b/zellij-utils/src/consts.rs @@ -38,6 +38,8 @@ lazy_static! { .join(format!("{}", Uuid::new_v4())); pub static ref ZELLIJ_PLUGIN_PERMISSIONS_CACHE: PathBuf = ZELLIJ_CACHE_DIR.join("permissions.kdl"); + pub static ref ZELLIJ_SESSION_INFO_CACHE_DIR: PathBuf = + ZELLIJ_CACHE_DIR.join(VERSION).join("session_info"); } pub const FEATURES: &[&str] = &[ @@ -92,6 +94,7 @@ mod not_wasm { add_plugin!(assets, "status-bar.wasm"); add_plugin!(assets, "tab-bar.wasm"); add_plugin!(assets, "strider.wasm"); + add_plugin!(assets, "session-manager.wasm"); assets }; } @@ -104,20 +107,13 @@ pub use unix_only::*; mod unix_only { use super::*; use crate::envs; - use crate::shared::set_permissions; + pub use crate::shared::set_permissions; use lazy_static::lazy_static; use nix::unistd::Uid; - use std::{env::temp_dir, fs}; + use std::env::temp_dir; lazy_static! { static ref UID: Uid = Uid::current(); - pub static ref ZELLIJ_IPC_PIPE: PathBuf = { - let mut sock_dir = ZELLIJ_SOCK_DIR.clone(); - fs::create_dir_all(&sock_dir).unwrap(); - set_permissions(&sock_dir, 0o700).unwrap(); - sock_dir.push(envs::get_session_name().unwrap()); - sock_dir - }; pub static ref ZELLIJ_TMP_DIR: PathBuf = temp_dir().join(format!("zellij-{}", *UID)); pub static ref ZELLIJ_TMP_LOG_DIR: PathBuf = ZELLIJ_TMP_DIR.join("zellij-log"); pub static ref ZELLIJ_TMP_LOG_FILE: PathBuf = ZELLIJ_TMP_LOG_DIR.join("zellij.log"); |