Applications#

class ignis.services.applications.ApplicationsService(*args: Any, **kwargs: Any)#

Provides a list of applications installed on the system. It also allows "pinning" of apps and retrieving a list of pinned applications.

Example usage:

from ignis.services.applications import ApplicationsService

applications = ApplicationsService.get_default()
for i in applications.apps:
    print(i.name)
property apps: list[Application]#
  • read-only

A list of all installed applications.

property pinned: list[Application]#
  • read-only

A list of all pinned applications.

classmethod search(apps: list[Application], query: str) list[Application]#

Search applications by a query.

Parameters:
  • apps (list[Application]) -- A list of applications where to search, e.g., apps.

  • query (str) -- The string to be searched for.

Returns:

A list of applications filtered by the provided query.

Return type:

list[Application]

class ignis.services.applications.Application(app: gi.repository.Gio.DesktopAppInfo, is_pinned: bool)#

An application object.

pinned()#
  • Signal

Emitted when the application has been pinned.

unpinned()#
  • Signal

Emitted when the application has been unpinned.

property app: gi.repository.Gio.DesktopAppInfo#
  • read-only

An instance of Gio.DesktopAppInfo.

property id: str | None#
  • read-only

The ID of the application.

property name: str#
  • read-only

The name of the application.

property description: str | None#
  • read-only

The description of the application.

property icon: str#
  • read-only

The icon of the application. If the app has no icon, "image-missing" will be returned.

property keywords: list[str]#
  • read-only

Keywords of the application. Ususally, these are words that describe the application.

property desktop_file: str | None#
  • read-only

The full path to the .desktop file of the application.

property executable: str#
  • read-only

The executable of the application.

property exec_string: str | None#
  • read-only

The string that contains the executable with command line arguments, used to launch the application.

property actions: list[ApplicationAction]#
  • read-only

A list of actions.

property is_pinned: bool#
  • read-write

Whether the application is pinned.

pin() None#

Pin the application.

Return type:

None

unpin() None#

Unpin the application.

Return type:

None

launch() None#

Launch the application.

Return type:

None

class ignis.services.applications.ApplicationAction(app: gi.repository.Gio.DesktopAppInfo, action: str)#

Application action.

property action: str#
  • read-only

The ID of the action.

property name: str#
  • read-only

The human-readable name of the action.

launch() None#

Launch this action.

Return type:

None