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.

Properties:
  • has_owner (bool, read-only): Whether D-Bus name has the owner (Whether Ignis is running).

Example usage:

from ignis.client import IgnisClient

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

client.reload()
open_window(window_name: str) None#

Same as open_window().

close_window(window_name: str) None#

Same as close_window().

toggle_window(window_name: str) None#

Same as toggle_window().

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().

inspector() None#

Same as inspector().

run_python(code: str) None#

Run a Python code inside the Ignis process.

Parameters:

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

run_file(path: str) None#

Run a Python file inside Ignis daemon.

Parameters:

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

reload() None#

Same as reload().