mirror of
https://github.com/zellij-org/zellij.git
synced 2024-12-24 17:53:36 +03:00
fix: shell/sleep stuff
This commit is contained in:
parent
28593b7348
commit
91f172588c
@ -845,7 +845,6 @@ fn start(os_input: OsInputOutput) {
|
||||
|
||||
let full_screen_ws = os_input.get_terminal_size_using_fd(0);
|
||||
os_input.into_raw_mode(0);
|
||||
::std::thread::sleep(std::time::Duration::from_millis(2000));
|
||||
let mut screen = Screen::new(&full_screen_ws, Box::new(os_input.clone()));
|
||||
let send_screen_instructions = screen.sender.clone();
|
||||
|
||||
|
@ -11,6 +11,8 @@ use nix::pty::{forkpty, Winsize};
|
||||
use std::os::unix::io::RawFd;
|
||||
use std::process::Command;
|
||||
|
||||
use std::env;
|
||||
|
||||
fn into_raw_mode(pid: RawFd) {
|
||||
let mut tio = tcgetattr(pid).expect("could not get terminal attribute");
|
||||
cfmakeraw(&mut tio);
|
||||
@ -63,12 +65,9 @@ fn spawn_terminal (ws: &Winsize) -> (RawFd, RawFd) {
|
||||
child
|
||||
},
|
||||
ForkResult::Child => {
|
||||
// TODO: why does $SHELL not work?
|
||||
// Command::new("$SHELL").spawn().expect("failed to spawn");
|
||||
// set_terminal_size_using_fd(0, ws.ws_col, ws.ws_row);
|
||||
Command::new("/usr/bin/fish").spawn().expect("failed to spawn");
|
||||
::std::thread::sleep(std::time::Duration::from_millis(300000));
|
||||
panic!("I am secondary, why?!");
|
||||
Command::new(env::var("SHELL").unwrap()).spawn().expect("failed to spawn");
|
||||
::std::thread::park();
|
||||
todo!();
|
||||
},
|
||||
};
|
||||
(pid_primary, pid_secondary.as_raw())
|
||||
|
Loading…
Reference in New Issue
Block a user