pub struct DesktopEntries { /* private fields */ }Expand description
The installed applications, from cx.desktop_entries(). Cloning it
is cheap.
Implementations§
Source§impl DesktopEntries
impl DesktopEntries
Sourcepub fn applications(&self) -> ReadSignal<Vec<DesktopEntry>>
pub fn applications(&self) -> ReadSignal<Vec<DesktopEntry>>
Every application, sorted by name ignoring case, then by ID. Empty
until the loop’s next turn after the first cx.desktop_entries().
Sourcepub fn lookup(&self, app_id: &str) -> Option<DesktopEntry>
pub fn lookup(&self, app_id: &str) -> Option<DesktopEntry>
The application a window’s app id names, as a task bar finds the
window’s icon: the one with that ID, else one whose ID differs only
in case, else one whose StartupWMClass matches ignoring case,
else one whose ID ends in that part after a dot, as
org.gnome.Nautilus does for nautilus. It reads the list as
get does, so a binding that calls it runs again when the list
changes.
Sourcepub fn launch(&self, id: &str)
pub fn launch(&self, id: &str)
Starts the application with ID id, on its own: in a process
group of its own, with no input or output, and in its working_dir
if it has one. A terminal app runs through xdg-terminal-exec.
What can’t start is logged: an unknown ID, a malformed Exec, a
terminal app without xdg-terminal-exec on PATH, and an app only
D-Bus starts, which the shell can’t do yet.
Sourcepub fn launch_action(&self, id: &str, action: &str)
pub fn launch_action(&self, id: &str, action: &str)
Starts one of an application’s actions, named by its
DesktopAction::id, as launch does.