-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
57 lines (41 loc) · 1.69 KB
/
constants.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
"""app constant values"""
import os
from pytz import timezone
from tzlocal import get_localzone_name
from theme import isDarkMode
_tz_name = get_localzone_name()
TIMEZONE = timezone(_tz_name)
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
APP_DIR = os.path.join(BASE_DIR, "appdata")
os.makedirs(APP_DIR, exist_ok=True)
APPSETTINGS_FILE = os.path.join(APP_DIR, "cfg.json")
DB_DIR = os.path.join(APP_DIR, "db")
os.makedirs(DB_DIR, exist_ok=True)
APP_DB = os.path.join(DB_DIR, "app.sqlite")
APP_ICON = os.path.join(APP_DIR, "icons", "appicon_large.png")
if isDarkMode():
ICONS_DIR = os.path.join(APP_DIR, "icons", "for_dark")
else:
ICONS_DIR = os.path.join(APP_DIR, "icons", "for_light")
DELETE_ICON = os.path.join(ICONS_DIR, "delete_32dp.png")
SUBMIT_ICON = os.path.join(ICONS_DIR, "done_all_32dp.png")
ENTRIES_ICON = os.path.join(ICONS_DIR, "forum_32dp.png")
SEARCH_ICON = os.path.join(ICONS_DIR, "search_32dp.png")
SETTINGS_ICON = os.path.join(ICONS_DIR, "settings_32dp.png")
ADDCOMMENT_ICON = os.path.join(ICONS_DIR, "add_note_32dp.png")
ADD_ICON = os.path.join(ICONS_DIR, "add_32dp.png")
MORE_ICON = os.path.join(ICONS_DIR, "more.png")
NOTIFS_ON_ICON = os.path.join(ICONS_DIR, "notifs_on.png")
NOTIFS_OFF_ICON = os.path.join(ICONS_DIR, "notifs_off.png")
SOLVED_ICON = os.path.join(ICONS_DIR, "solved.png")
UNSOLVED_ICON = os.path.join(ICONS_DIR, "unsolved.png")
SHOW_FILE_ICON = os.path.join(ICONS_DIR, "see_file.png")
BACKUP_ICON = os.path.join(ICONS_DIR, "backup_table.png")
SOLVED_PLACEHOLDER = " -- Select -- "
TIME_UNITS = {"hours": 60, "minutes": 1}
DEFAULT_SETTINGS = {
"notify_after": 30,
"notify_units": "minutes",
"disable_saturday": False,
"disable_sunday": False,
}