7
7
from platformdirs import user_config_path , user_pictures_path , user_cache_path
8
8
9
9
from waypaper .aboutdata import AboutData
10
- from waypaper .options import FILL_OPTIONS , SORT_OPTIONS
10
+ from waypaper .options import FILL_OPTIONS , SORT_OPTIONS , SWWW_TRANSITIONS
11
11
12
12
class Config :
13
13
"""User configuration loaded from the config.ini file"""
@@ -19,6 +19,7 @@ def __init__(self):
19
19
self .sort_option = "name"
20
20
self .backend = "swaybg"
21
21
self .color = "#ffffff"
22
+ self .swww_transition = "any"
22
23
self .lang = "en"
23
24
self .monitors = [self .selected_monitor ]
24
25
self .wallpaper = []
@@ -48,6 +49,9 @@ def read(self):
48
49
self .sort_option = SORT_OPTIONS [0 ]
49
50
self .backend = config .get ("Settings" , "backend" , fallback = self .backend )
50
51
self .color = config .get ("Settings" , "color" , fallback = self .color )
52
+ self .swww_transition = config .get ("Settings" , "swww_transition" , fallback = self .swww_transition )
53
+ if self .swww_transition not in SWWW_TRANSITIONS :
54
+ self .swww_transition = "any"
51
55
self .lang = config .get ("Settings" , "language" , fallback = self .lang )
52
56
self .include_subfolders = config .getboolean ("Settings" , "subfolders" , fallback = self .include_subfolders )
53
57
@@ -84,6 +88,7 @@ def save(self):
84
88
config .set ("Settings" , "sort" , self .sort_option )
85
89
config .set ("Settings" , "backend" , self .backend )
86
90
config .set ("Settings" , "color" , self .color )
91
+ config .set ("Settings" , "swww_transition" , self .swww_transition )
87
92
config .set ("Settings" , "language" , self .lang )
88
93
config .set ("Settings" , "subfolders" , str (self .include_subfolders ))
89
94
config .set ("Settings" , "wallpaper" , "," .join (self .wallpaper ))
0 commit comments