This repository has been archived by the owner on Oct 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
81 lines (64 loc) · 2.03 KB
/
setup.py
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# !/usr/bin/python3
from scheduler import controlling_job
from pathlib import Path
from time import sleep
from utils.utils import word_derivatives
import json
import os
#from tqdm import tqdm
# import scheduler
#h = os.path.expanduser('~')
h = Path.home()
BASE_DIR = os.path.join(h, "KDynamic")
THEME_DIR = os.path.join(BASE_DIR, "theme")
PIC_DIR = os.path.join(BASE_DIR, "pics/")
# paths
dirs = ["light", "light_dark", "night"]
# folder locations
tlist = {}
# create folders
def fcreate(env: str, wm) -> None:
# FOLDERS (parents)
# create theme folders
# os_spec_dir = f"{THEME_DIR}/{env.upper()}"
os.makedirs(f"{THEME_DIR}")
# create pic folders
for pd in dirs:
os.makedirs(f"{PIC_DIR}/{pd}")
# create command txt to pic in pic folder
# PICS and TXTs (childs)
# create theme files
# get theme names
# get 3 times
for count in range(3):
#tlist.append(input(f"{dirs[count]} theme name: "))
tlist[f"{dirs[count]}_t"] = input(f"{dirs[count]} theme name: ")
tlist[f"{dirs[count]}_h"] = input(f"{dirs[count]} theme start hour: ")
tlist['env'] = env
tlist['wm'] = wm
"""
light_icon = input('Light Icon Theme: ')
night_icon = input('Night Icon Theme: ')
"""
"""
tlist['light_i'] = light_icon
tlist['night_i'] = night_icon
"""
# dump json file
with open(f'{THEME_DIR}/themes.json', 'w') as f:
json.dump(tlist, f)
if __name__ == '__main__':
# desktop env selection
# install needed libs
from termcolor import colored
print(colored('please be sure you installed requirement libs', 'red'))
sleep(1)
desk_env = input('What is your current desktop environment [KDE, GNOME, CINNAMON]: ')
os.makedirs(BASE_DIR)
#if desk_env in ('kde','KDE', 'Kde'):
if 'KDE' in word_derivatives(desk_env):
wm = input('Breeze or Kvantum: ').upper()
#wm = q if q in word_derivatives(q) else print('nopee')
else: wm = ""
controlling_job()
fcreate(desk_env, wm)