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->notificationsRecorder->recorderand 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!The options file is located at
ignis.DATA_DIR/options.json ($XDG_DATA_HOME/ignis/options.json).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, thenew_popupsignal will not be emitted, and all newNotificationinstances will havepopupset toFalse.
-
dnd:
- class Recorder(*args, **kwargs)#
Options for the
RecorderService.This mainly includes the default recorder configuration options. For more detailed information, see
RecorderConfig.-
bitrate:
int= 8000# The bitrate of the recording.
Deprecated since version 0.6: This option is deprecated and no longer has any effect.
-
default_file_location:
str= 'XDG Videos directory'# The default location for saving recordings. Defaults to XDG Video directory. Has effect only if
default_pathis not overridden.Note
If XDG user dirs are not configured, it defaults to
$HOME.
-
default_filename:
str= '%Y-%m-%d_%H-%M-%S.mp4'# The default filename for recordings. Supports time formating. Has effect only if
default_pathis not overridden.
-
default_source:
Literal['screen','screen-direct','focused','portal','region'] |str= 'portal'# The default recording source.
-
default_path:
str= 'XDG Videos directory/%Y-%m-%d_%H-%M-%S.mp4'# The default output file path. By default equals to
default_file_location/default_filename.
-
default_quality:
Literal['medium','high','very_high','ultra'] |None= None# The default quality.
-
bitrate:
- 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".
-
pinned_apps:
- class Wallpaper(*args, **kwargs)#
Options for the
WallpaperService.