1
0
Fork 0
forked from wry/wry

autocommit 2022-04-14 19:52:11 CEST

This commit is contained in:
Julian Orth 2022-04-14 19:52:11 +02:00
parent 35ddfbcbe3
commit 5f13954dbc
27 changed files with 556 additions and 312 deletions

View file

@ -318,6 +318,10 @@ impl Client {
self.send(&ClientMessage::SetMono { seat, mono });
}
pub fn set_env(&self, key: &str, val: &str) {
self.send(&ClientMessage::SetEnv { key, val });
}
pub fn set_status(&self, status: &str) {
self.send(&ClientMessage::SetStatus { status });
}

View file

@ -221,6 +221,10 @@ pub enum ClientMessage<'a> {
initial: Option<Duration>,
periodic: Option<Duration>,
},
SetEnv {
key: &'a str,
val: &'a str,
},
}
#[derive(Encode, Decode, Debug)]

View file

@ -56,6 +56,10 @@ pub fn switch_to_vt(n: u32) {
get!().switch_to_vt(n)
}
pub fn set_env(key: &str, val: &str) {
get!().set_env(key, val);
}
pub struct Command {
prog: String,
args: Vec<String>,