-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
25 lines (21 loc) · 921 Bytes
/
main.py
File metadata and controls
25 lines (21 loc) · 921 Bytes
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
import time
from config import WallpaperChange, Config
from wallpaper import change_wallpaper_based_on_sorted_wcs
def create_test_config() -> None:
"""
Function used to create the default configuration directory and generate a default configuration file.
"""
Config.create_default_config_dir()
wc1 = WallpaperChange('E:\\Edouard\Pictures\wonderbolt_dash_silhouette_wall_by_sambaneko-da81m83.png', 9, 0)
wc2 = WallpaperChange('E:\\Edouard\Pictures\Wallpaper_Gravity_Falls.png', 20, 00)
config = Config([wc1, wc2])
Config.serialize_config(config)
if __name__ == '__main__':
# Uncomment to create a test configuration
# create_test_config()
config = Config.deserialize_config()
while True:
print("TICK")
sorted_wcs = WallpaperChange.sort_by_time_asc(config.wallpaper_changes)
change_wallpaper_based_on_sorted_wcs(sorted_wcs)
time.sleep(60)