Skip to main content

Module open

Module open 

Source
Expand description

The links service’s system opener (ADR 0017): local files and folders opened with the system’s default application, and Reveal, the file manager with the file selected. Web pages and mail still go through egui’s OpenUrl (the browser, $BROWSER honoured; a new tab on the web build).

Experimental: may change in any release (docs/stability.md).
Open a file or folderReveal
Linuxxdg-open (inside Flatpak, the runtime’s forwards to the OpenURI portal, which opens what the sandbox can read)the freedesktop file manager interface (org.freedesktop.FileManager1.ShowItems), else the OpenURI portal’s OpenDirectory
macOSopenopen -R
WindowsShellExecuteW (programs never reach it: the policy refuses them first)Explorer’s selection (SHOpenFolderAndSelectItems)
The web buildrefused with the reasonrefused

The work is done on a thread (a D-Bus call may take a moment): the link.open step ends opening, then the journal says link.opened, or link.failed with a warning toast.

use egui_pop_api::App;
use egui_pop_platform::open::OpenPlugin;

let app = App::builder()
    .plugins(egui_pop_api::DefaultPlugins)
    .plugin(OpenPlugin)
    .build(&egui::Context::default())
    .unwrap();

Structs§

OpenPlugin
Installs SystemOpener in the links service.
SystemOpener
Opens local files and folders, and reveals them, with the system; web pages and mail through egui’s opener.

Constants§

PLUGIN
The plugin’s id.