all: split reusable components into workspace crates
This commit is contained in:
parent
2a079ed800
commit
657e7ce2f7
225 changed files with 7422 additions and 17602 deletions
|
|
@ -22,7 +22,6 @@ 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 {
|
||||
|
|
@ -38,7 +37,6 @@ impl Command {
|
|||
args: vec![],
|
||||
env: Default::default(),
|
||||
fds: Default::default(),
|
||||
tag: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,27 +82,6 @@ impl Command {
|
|||
self.fd(2, fd)
|
||||
}
|
||||
|
||||
/// Runs the application with access to privileged wayland protocols.
|
||||
///
|
||||
/// The default is `false`.
|
||||
pub fn privileged(&mut self) -> &mut Self {
|
||||
match get!(self).get_socket_path() {
|
||||
Some(path) => {
|
||||
self.env("WAYLAND_DISPLAY", &format!("{path}.jay"));
|
||||
}
|
||||
_ => {
|
||||
log::error!("Compositor did not send the socket path");
|
||||
}
|
||||
}
|
||||
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