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.

There are options available for this service: Applications.

Example usage:

from ignis.services.applications import ApplicationsService

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

A list of all installed applications.

gproperty 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)#

An application object.

signal pinned#

Emitted when the application has been pinned.

signal unpinned#

Emitted when the application has been unpinned.

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

An instance of Gio.DesktopAppInfo.

gproperty id: str | None#
  • read-only

The ID of the application.

gproperty name: str#
  • read-only

The name of the application.

gproperty description: str | None#
  • read-only

The description of the application.

gproperty icon: str#
  • read-only

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

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

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

gproperty desktop_file: str | None#
  • read-only

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

gproperty executable: str#
  • read-only

The executable of the application.

gproperty exec_string: str | None#
  • read-only

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

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

A list of actions.

gproperty is_pinned: bool#
  • read-write

Whether the application is pinned.

gproperty is_terminal: bool#
  • read-only

Whether the application has to be launched in a terminal.

pin() None#

Pin the application.

Return type:

None

unpin() None#

Unpin the application.

Return type:

None

launch(command_format: str | None = None, terminal_format: str | None = None) None#

Launch the application.

Parameters:
  • command_format (str | None, default: None) -- A format string for the command to launch. %command% will be replaced with the actual command. Shell syntax is supported.

  • terminal_format (str | None, default: None) -- A format string for the command to launch if the application has to be run in a terminal. %command% will be replaced with the actual command. Shell syntax is supported.

Return type:

None

To launch terminal applications, pass the terminal_format argument:

# kitty for example, format may differ for other terminals
APPLICATION.launch(terminal_format="kitty %command%")
launch_uwsm() None#

Launch the application using UWSM (Universal Wayland Session Manager).

Return type:

None

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

Application action.

gproperty action: str#
  • read-only

The ID of the action.

gproperty name: str#
  • read-only

The human-readable name of the action.

launch() None#

Launch this action.

Return type:

None