config: allow spawning clients with tags
This commit is contained in:
parent
8b19315f50
commit
a1df575262
11 changed files with 80 additions and 7 deletions
|
|
@ -22,6 +22,7 @@ pub struct Command {
|
|||
pub(crate) args: Vec<String>,
|
||||
pub(crate) env: HashMap<String, String>,
|
||||
pub(crate) fds: RefCell<HashMap<i32, OwnedFd>>,
|
||||
pub(crate) tag: Option<String>,
|
||||
}
|
||||
|
||||
impl Command {
|
||||
|
|
@ -37,6 +38,7 @@ impl Command {
|
|||
args: vec![],
|
||||
env: Default::default(),
|
||||
fds: Default::default(),
|
||||
tag: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -97,6 +99,12 @@ impl Command {
|
|||
self
|
||||
}
|
||||
|
||||
/// Adds a tag to Wayland connections created by the spawned command.
|
||||
pub fn tag(&mut self, tag: &str) -> &mut Self {
|
||||
self.tag = Some(tag.to_owned());
|
||||
self
|
||||
}
|
||||
|
||||
/// Executes the command.
|
||||
///
|
||||
/// This consumes all attached file descriptors.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue