FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_desktop Namespace Reference

Desktop integration command implementation. More...

Typedefs

using IntegrationItem = ns_db::ns_desktop::IntegrationItem
 

Functions

Value< void > integrate (ns_config::FlatImage const &fim)
 Integrates flatimage desktop data in current system.
 
Value< fs::path > setup_resolve_icon (std::string_view icon_path_or_url)
 Resolves icon path or URL to a local file path.
 
Value< void > setup (ns_config::FlatImage const &fim, fs::path const &path_file_json_src)
 Setup desktop integration in FlatImage.
 
Value< void > enable (ns_config::FlatImage const &fim, std::set< IntegrationItem > set_integrations)
 Enables desktop integration for FlatImage.
 
Value< void > clean (ns_config::FlatImage const &fim)
 Cleans desktop integration files.
 
Value< void > dump_icon (ns_config::FlatImage const &fim, fs::path path_file_dst)
 Dumps the png or svg icon data to a file.
 
Value< std::string > dump_entry (ns_config::FlatImage const &fim)
 Dumps the desktop entry if integration is configured.
 
Value< std::string > dump_mimetype (ns_config::FlatImage const &fim)
 Dumps the application mime type file if integration is configured.
 

Detailed Description

Desktop integration command implementation.

Implements the fim-desktop command for XDG desktop integration including .desktop file generation, MIME type registration, icon installation at multiple resolutions and application menu integration. Handles icon extraction, resizing, and proper XDG directory placement.

Typedef Documentation

◆ IntegrationItem

using ns_desktop::IntegrationItem = ns_db::ns_desktop::IntegrationItem

Definition at line 39 of file desktop.hpp.

Function Documentation

◆ clean()

Value< void > ns_desktop::clean ( ns_config::FlatImage const & fim)
inlinenodiscard

Cleans desktop integration files.

Parameters
fimThe FlatImage configuration object
Returns
Value<void> Nothing on success or the respective error

Definition at line 646 of file desktop.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump_entry()

Value< std::string > ns_desktop::dump_entry ( ns_config::FlatImage const & fim)
inlinenodiscard

Dumps the desktop entry if integration is configured.

Parameters
fimThe FlatImage configuration object
Returns
Value<std::string> The desktop entry or the respective error

Definition at line 743 of file desktop.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump_icon()

Value< void > ns_desktop::dump_icon ( ns_config::FlatImage const & fim,
fs::path path_file_dst )
inlinenodiscard

Dumps the png or svg icon data to a file.

Parameters
fimThe FlatImage configuration object
path_file_dstThe destination file to write the icon to
Returns
Value<void> Nothing on success or the respective error

Definition at line 708 of file desktop.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump_mimetype()

Value< std::string > ns_desktop::dump_mimetype ( ns_config::FlatImage const & fim)
inlinenodiscard

Dumps the application mime type file if integration is configured.

Parameters
fimThe FlatImage configuration object
Returns
Value<std::string> The mime type data or the respective error

Definition at line 762 of file desktop.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enable()

Value< void > ns_desktop::enable ( ns_config::FlatImage const & fim,
std::set< IntegrationItem > set_integrations )
inlinenodiscard

Enables desktop integration for FlatImage.

Parameters
fimThe FlatImage configuration object
set_integrationsThe set with integrations to enable
Returns
Value<void> Nothing on success or the respective error

Definition at line 620 of file desktop.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ integrate()

Value< void > ns_desktop::integrate ( ns_config::FlatImage const & fim)
inlinenodiscard

Integrates flatimage desktop data in current system.

Parameters
configFlatimage configuration object
Returns
Value<void> Nothing or success, or the respective error

Definition at line 455 of file desktop.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup()

Value< void > ns_desktop::setup ( ns_config::FlatImage const & fim,
fs::path const & path_file_json_src )
inlinenodiscard

Setup desktop integration in FlatImage.

Parameters
fimFlatImage object
path_file_json_srcPath to the json which contains configuration data
Returns
Value<void> Nothing on success, or the respective error

Definition at line 563 of file desktop.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_resolve_icon()

Value< fs::path > ns_desktop::setup_resolve_icon ( std::string_view icon_path_or_url)
inlinenodiscard

Resolves icon path or URL to a local file path.

If the icon is a URL (http:// or https://), downloads it using wget. Otherwise, returns the path as-is.

Parameters
fimFlatImage object
icon_path_or_urlPath to local icon file or URL to download from
Returns
Value<fs::path> Path to the icon file (downloaded or original), or error

Definition at line 523 of file desktop.hpp.

Here is the call graph for this function:
Here is the caller graph for this function: