Client#

class ignis.client.IgnisClient#

Class for interacting with Ignis D-Bus interface. Provides the same functionality as the CLI.

Useful for scripts that run outside the Ignis process.

All methods will raise IgnisNotRunningError if Ignis is not running.

Warning

Do not use this class inside the main Ignis process (e.g., in the config file). It's unnecessary; use IgnisApp instead.

Example usage:

from ignis.client import IgnisClient

client = IgnisClient()
print(client.list_windows())

client.reload()
property has_owner: bool#
  • read-only

Whether D-Bus name has the owner (Whether Ignis is running).

open_window(window_name: str) None#

Same as open_window().

Return type:

None

close_window(window_name: str) None#

Same as close_window().

Return type:

None

toggle_window(window_name: str) None#

Same as toggle_window().

Return type:

None

list_windows() list[str]#

Get a list of all window names.

Returns:

A list of all window names.

Return type:

list[str]

quit() None#

Same as quit().

Return type:

None

inspector() None#

Same as inspector().

Return type:

None

run_python(code: str) None#

Run a Python code inside the Ignis process.

Parameters:

code (str) -- The Python code to execute.

Return type:

None

run_file(path: str) None#

Run a Python file inside Ignis daemon.

Parameters:

path (str) -- The path to the Python file to execute.

Return type:

None

reload() None#

Same as reload().

Return type:

None