Crate desk_exec

Source
Expand description

§Desk-exec

Desk-exec provides an API to search for and execute programs from their XDG desktop entry files.

§Overview

This API is designed around the ‘DesktopEntry’ struct from the ‘freedesktop_desktop_entry’ crate. It provides the functionality to do a substring search for list of directories, and execute the program within a desktop entry.

Enums§

  • Represents all possible error variants when trying to execute a desktop entry

Traits§

  • Gives the ability for a desktop entry type to provide an executable name cleaned from any placeholder values

Functions§

  • Attempts to execute the program within a desktop entry. The executed program will be detached from the terminal if ‘detach’ is true.
  • Panic-less wrapper for ‘fredesktop_desktop_entry::default_paths()’. Returns the default XDG data directories, where desktop entries are stored on most systems.
  • Searches a list of directories for any desktop entry files that match the ‘program_name’ pattern. Will return early with the first match found when ‘get_first’ is true.

Type Aliases§