Expand description
§applications
Access desktop application entries defined according to the XDG Desktop Entry Specification.
§Example
use applications::ApplicationService;
let service = ApplicationService::new();
// Display names of all apps
for i in service.apps() {
println!("{}", i.name())
}
// Fuzzy search by name
// Best matches come first in the vector
let matches = service.search_by_name("firox");
if let Some(app) = matches.first() {
// Launch application
app.launch();
// Inspect actions
for action in app.actions() {
println!("{}", action.name());
// You can launch them too
// action.launch()
}
}
Structs§
- Action
Handle - A handle which represents a desktop application action.
- Application
Service - A service to access desktop applications.
- Desktop
AppHandle - A handle which represents a desktop application.
Enums§
- Error
- Error enum
Type Aliases§
- Result
- Alias for a
std::result::Resultwith the error typecrate::Error.