The fixup callback can now by async, which makes it possible to use other async functions in the callback. There is an additional parameter to wezterm.exec_domain that allows setting the label that is shown in the launcher menu. It accepts either a string value or an async callback function that can be used to compute the label dynamically.
18 lines
457 B
Rust
18 lines
457 B
Rust
use luahelper::impl_lua_conversion_dynamic;
|
|
use wezterm_dynamic::{FromDynamic, ToDynamic, Value};
|
|
|
|
#[derive(Debug, Clone, FromDynamic, ToDynamic)]
|
|
pub enum ValueOrFunc {
|
|
Value(Value),
|
|
Func(String),
|
|
}
|
|
impl_lua_conversion_dynamic!(ValueOrFunc);
|
|
|
|
#[derive(Debug, Clone, FromDynamic, ToDynamic)]
|
|
pub struct ExecDomain {
|
|
pub name: String,
|
|
pub fixup_command: String,
|
|
pub label: Option<ValueOrFunc>,
|
|
}
|
|
impl_lua_conversion_dynamic!(ExecDomain);
|