Skip to main content

applications/
lib.rs

1//! # applications
2//!
3//! Access desktop application entries defined according to the [XDG Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry/latest).
4//!
5//! # Example
6//! ```rust
7//! use applications::ApplicationService;
8//!
9//! let service = ApplicationService::new();
10//!
11//! // Display names of all apps
12//! for i in service.apps() {
13//!     println!("{}", i.name())
14//! }
15//!
16//! // Fuzzy search by name
17//! // Best matches come first in the vector
18//! let matches = service.search_by_name("firox");
19//!
20//!
21//! if let Some(app) = matches.first() {
22//!     // Launch application
23//!     app.launch();
24//!
25//!     // Inspect actions
26//!     for action in app.actions() {
27//!         println!("{}", action.name());
28//!
29//!         // You can launch them too
30//!         // action.launch()
31//!     }
32//! }
33//!
34//! ```
35#![warn(missing_docs)]
36mod action;
37mod desktopapp;
38mod error;
39mod event;
40mod locale;
41mod private_prelude;
42mod service;
43mod utils;
44
45pub use action::ActionHandle;
46pub use desktopapp::DesktopAppHandle;
47pub use error::{Error, Result};
48pub use service::ApplicationService;