Options#

class ignis.options.Options(*args, **kwargs)#

Options for Ignis.

Warning

Use already initialized instance of this class:

from ignis.options import options

print(options.notifications.dnd)

Below are classes with options, their names begin with a capital letter. However, if you want to get the current value of an option or set a value, use an initialized instance that starts with a lowercase letter.

For example:
  • Notifications -> notifications

  • Recorder -> recorder

  • and etc.

You can use classes (not instances of them) to obtain default values of options.

Hint

If the option is of type TrackedList, it means that it is regular Python list. But you can call .append(), .remove(), .insert(), etc., and the changes will be applied!

Example usage:

from ignis.options import options

# Get an option value
print(options.notifications.dnd)

# Set a new value for an option
options.notifications.dnd = True

# Connect to an option change event
options.notifications.connect_option("dnd", lambda: print("option dnd changed! new value:", options.notifications.dnd))

# You can also bind to an option!
options.notifications.bind("dnd")

# Obtain the default value of an option
print(options.Notifications.popup_timeout)
class Notifications(*args, **kwargs)#

Options for the NotificationService.

dnd: bool = False#

Do Not Disturb mode.

If set to True, the new_popup signal will not be emitted, and all new Notification instances will have popup set to False.

popup_timeout: int = 5000#

The timeout before a popup is automatically dismissed, in milliseconds.

max_popups_count: int = 3#

The maximum number of popups.

If the length of the popups list exceeds max_popups_count, the oldest popup will be dismissed.

class Recorder(*args, **kwargs)#

Options for the RecorderService.

bitrate: int = 8000#

The bitrate of the recording.

default_file_location: str | None = 'XDG Videos directory'#

The default location for saving recordings. Defaults to XDG Video directory.

default_filename: str = '%Y-%m-%d_%H-%M-%S.mp4'#

The default filename for recordings. Supports time formating.

class Applications(*args, **kwargs)#

Options for the ApplicationsService.

pinned_apps: TrackedList[str] = []#

A list of the pinned applications desktop files, e.g. "firefox.desktop", "code.desktop".

class Wallpaper(*args, **kwargs)#

Options for the WallpaperService.

wallpaper_path: str | None = None#

The path to the wallpaper image.