summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/consts.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2021-05-19 20:01:09 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2021-05-22 22:19:50 +0530
commitd231d28d7cdf7df1f44268627f5630edb19b21a0 (patch)
treec9d74e7844b8007c8bcd3d721bd56bd9c064a3f7 /zellij-utils/src/consts.rs
parentd6fc7b04d14e8eeb5157cace639cc1d157766987 (diff)
Implement the minimal list-sessions command
Diffstat (limited to 'zellij-utils/src/consts.rs')
-rw-r--r--zellij-utils/src/consts.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/zellij-utils/src/consts.rs b/zellij-utils/src/consts.rs
index 799e29132..012e36999 100644
--- a/zellij-utils/src/consts.rs
+++ b/zellij-utils/src/consts.rs
@@ -27,7 +27,7 @@ lazy_static! {
pub static ref SESSION_NAME: String = names::Generator::default().next().unwrap();
pub static ref ZELLIJ_PROJ_DIR: ProjectDirs =
ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap();
- pub static ref ZELLIJ_IPC_PIPE: PathBuf = {
+ pub static ref ZELLIJ_SOCK_DIR: PathBuf = {
let mut ipc_dir = env::var("ZELLIJ_SOCKET_DIR").map_or_else(
|_| {
ZELLIJ_PROJ_DIR
@@ -37,11 +37,15 @@ lazy_static! {
PathBuf::from,
);
ipc_dir.push(VERSION);
- fs::create_dir_all(&ipc_dir).unwrap();
- set_permissions(&ipc_dir).unwrap();
- ipc_dir.push(&*SESSION_NAME);
ipc_dir
};
+ 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).unwrap();
+ sock_dir.push(&*SESSION_NAME);
+ sock_dir
+ };
pub static ref ZELLIJ_TMP_DIR: PathBuf =
PathBuf::from("/tmp/zellij-".to_string() + &format!("{}", *UID));
pub static ref ZELLIJ_TMP_LOG_DIR: PathBuf = ZELLIJ_TMP_DIR.join("zellij-log");