Available on crate feature
background only.Expand description
Request to run in the background or started automatically when the user logs in.
Note This portal only works for sandboxed applications.
Wrapper of the DBus interface: org.freedesktop.portal.Background.
§Examples
use ashpd::desktop::background::Background;
async fn run() -> ashpd::Result<()> {
let response = Background::request()
.reason("Automatically fetch your latest mails")
.auto_start(true)
.command(&["geary"])
.dbus_activatable(false)
.send()
.await?
.response()?;
println!("{}", response.auto_start());
println!("{}", response.run_in_background());
Ok(())
}If no command is provided, the Exec line from the desktop
file will be used.
Structs§
- Background
- The response of a
BackgroundRequestrequest. - Background
Proxy - The interface lets sandboxed applications request that the application is allowed to run in the background or started automatically when the user logs in.
- Background
Request - A builder-pattern type to construct
Background. - Background
Request Options - Specified options for a
BackgroundProxy::request_backgroundrequest. - SetStatus
Options - Specified options for a
BackgroundProxy::set_statusrequest.