diff --git a/Cargo.lock b/Cargo.lock
index ef3cd7706..cf20a69ad 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -696,6 +696,7 @@ dependencies = [
"notify",
"portable-pty",
"pretty_env_logger",
+ "promise",
"serde",
"smol",
"termwiz",
diff --git a/config/Cargo.toml b/config/Cargo.toml
index 42af0b312..6386262f4 100644
--- a/config/Cargo.toml
+++ b/config/Cargo.toml
@@ -28,6 +28,7 @@ notify = "4.0"
portable-pty = { path = "../pty", features = ["serde_support"]}
serde = {version="1.0", features = ["rc", "derive"]}
smol = "1.2"
+promise = { path = "../promise" }
termwiz = { path = "../termwiz" }
toml = "0.5"
wezterm-term = { path = "../term", features=["use_serde"] }
diff --git a/config/src/lib.rs b/config/src/lib.rs
index f6bec1625..e26fff1e9 100644
--- a/config/src/lib.rs
+++ b/config/src/lib.rs
@@ -7,7 +7,10 @@ use luahelper::impl_lua_conversion;
use mlua::Lua;
use portable_pty::{CommandBuilder, PtySize};
use serde::{Deserialize, Serialize};
+use smol::channel::{Receiver, Sender};
+use smol::prelude::*;
use std;
+use std::cell::RefCell;
use std::collections::HashMap;
use std::ffi::{OsStr, OsString};
use std::fs;
@@ -16,6 +19,7 @@ use std::io::prelude::*;
#[cfg(unix)]
use std::os::unix::fs::DirBuilderExt;
use std::path::{Path, PathBuf};
+use std::rc::Rc;
use std::sync::{Arc, Mutex};
use std::time::Duration;
use termwiz::hyperlink;
@@ -58,6 +62,123 @@ lazy_static! {
static ref MAKE_LUA: Mutex