Skip to main content

Crate applications

Crate applications 

Source
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§

ActionHandle
A handle which represents a desktop application action.
ApplicationService
A service to access desktop applications.
DesktopAppHandle
A handle which represents a desktop application.

Enums§

Error
Error enum

Type Aliases§

Result
Alias for a std::result::Result with the error type crate::Error.