summaryrefslogtreecommitdiffstats
path: root/zellij-client
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2021-05-28 11:42:00 +0200
committerAram Drevekenin <aram@poor.dev>2021-05-28 11:42:00 +0200
commit4ac77874ac2885a4685f0ad83110a8b11db6ace5 (patch)
tree82a511735657b4e1adff7d7ad7a430460c23f16c /zellij-client
parent0c0355dbc6e0159a72b0f55c7aabb83d76c2312a (diff)
hotfix: remove termbg call so stdin won't get stuck
Diffstat (limited to 'zellij-client')
-rw-r--r--zellij-client/src/os_input_output.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/zellij-client/src/os_input_output.rs b/zellij-client/src/os_input_output.rs
index 9d8617f5f..1c5026740 100644
--- a/zellij-client/src/os_input_output.rs
+++ b/zellij-client/src/os_input_output.rs
@@ -9,7 +9,7 @@ use std::io::prelude::*;
use std::os::unix::io::RawFd;
use std::path::Path;
use std::sync::{Arc, Mutex};
-use zellij_tile::data::{Palette, PaletteColor};
+use zellij_tile::data::Palette;
use zellij_utils::{
errors::ErrorContext,
ipc::{ClientToServerMsg, IpcReceiverWithContext, IpcSenderWithContext, ServerToClientMsg},
@@ -161,14 +161,17 @@ impl ClientOsApi for ClientOsInputOutput {
*self.receive_instructions_from_server.lock().unwrap() = Some(receiver);
}
fn load_palette(&self) -> Palette {
- let timeout = std::time::Duration::from_millis(100);
- let mut palette = default_palette();
- if let Ok(rgb) = termbg::rgb(timeout) {
- palette.bg = PaletteColor::Rgb((rgb.r as u8, rgb.g as u8, rgb.b as u8));
- // TODO: also dynamically get all other colors from the user's terminal
- // this should be done in the same method (OSC ]11), but there might be other
- // considerations here, hence using the library
- };
+ let palette = default_palette();
+ // this was removed because termbg doesn't release stdin in certain scenarios (we know of
+ // windows terminal and FreeBSD): https://github.com/zellij-org/zellij/issues/538
+ //
+ // let timeout = std::time::Duration::from_millis(100);
+ // if let Ok(rgb) = termbg::rgb(timeout) {
+ // palette.bg = PaletteColor::Rgb((rgb.r as u8, rgb.g as u8, rgb.b as u8));
+ // // TODO: also dynamically get all other colors from the user's terminal
+ // // this should be done in the same method (OSC ]11), but there might be other
+ // // considerations here, hence using the library
+ // };
palette
}
}