-
Notifications
You must be signed in to change notification settings - Fork 8
/
settings.pyi
43 lines (35 loc) · 905 Bytes
/
settings.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""
This is the settings module for decky plugins.
"""
class SettingsManager:
"""
Handles loading, saving, and editing settings for decky plugins.
"""
settings: dict[str, str]
"""
A dictionary containing the settings managed by this SettingsManager.
"""
path: str
"""
The path to the settings.json file for this plugin.
"""
def __init__(self, name, settings_directory = None) -> None:
"""
Creates a new SettingsManager instance.
"""
def read(self) -> None:
"""
Loads the plugin's settings into memory.
"""
def commit(self) -> None:
"""
Saves the current settings to the file system.
"""
def getSetting(self, key, default=None):
"""
Gets a specific setting, returning the default value if it isn't found.
"""
def setSetting(self, key, value) -> None:
"""
Sets a specific setting to the provided value.
"""