Struct leftwm_core::utils::child_process::Nanny
source · pub struct Nanny {}Implementations§
source§impl Nanny
impl Nanny
sourcepub fn autostart() -> Children
pub fn autostart() -> Children
As Desktop Application Autostart Specification describe,
some applications placing an application’s .desktop file in one of the Autostart Directories
could be automatically launched during startup of the user’s desktop environment after the user has logged in.
The Autostart Directories are $XDG_CONFIG_DIRS/autostart and $XDG_CONFIG_HOME/autostart.
$XDG_CONFIG_DIRS and $XDG_CONFIG_HOME can be found in
XDG Base Directory Specification.
There are some principles about autostart file:
- An application
.desktopfile must have the format as defined in the Desktop Entry Specification - If two files have the same filename in
$XDG_CONFIG_DIRS/autostartand$XDG_CONFIG_HOME/autostart, e.g.foo.desktop,$XDG_CONFIG_DIRS/autostart/foo.desktopwill be ignored.
Autostart Entry will be ignored when:
- the
.desktopfile has theHiddenkey set to true. - string identifying the desktop environments not in
OnlyShowIn - string identifying the desktop environments in
NotShowIn
The string identifying the desktop environments means $XDG_CURRENT_DESKTOP,
you can find some from Registered OnlyShowIn Environments.
LeftWM use LeftWM as identification (case-sensitive).
sourcepub fn run_global_up_script() -> Result<Child>
pub fn run_global_up_script() -> Result<Child>
Runs the ‘up’ script in the config directory, if there is one.
Errors
Will error if unable to open current config directory. Could be caused by inadequate permissions.
sourcepub fn boot_current_theme() -> Result<Child>
pub fn boot_current_theme() -> Result<Child>
Runs the ‘up’ script of the current theme, if there is one.
Errors
Will error if unable to open current theme directory. Could be caused by inadequate permissions.