summaryrefslogtreecommitdiff
path: root/src/config/types.ts
blob: eea8738ecf82950f9fb86cc6d3c0b0026daece76 (plain)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
const BOOL = "boolean";
const STR = "string";
const NUM = "number";
const ARR = (type: string | string[]) => `array of ${typeof type === "string" ? type : JSON.stringify(type)}`;
const OBJ_ARR = (shape: object) => ARR(JSON.stringify(shape));

const barModules = [
    "osIcon",
    "activeWindow",
    "mediaPlaying",
    "brightnessSpacer",
    "workspaces",
    "volumeSpacer",
    "tray",
    "statusIcons",
    "pkgUpdates",
    "notifCount",
    "battery",
    "dateTime",
    "power",
];

export default {
    "style.transparency": ["off", "normal", "high"],
    "style.borders": BOOL,
    "style.vibrant": BOOL,
    "config.notifyOnError": BOOL,
    // Bar
    "bar.vertical": BOOL,
    "bar.style": ["gaps", "panel", "embedded"],
    "bar.layout.type": ["centerbox", "flowbox"],
    "bar.layout.centerbox.start": ARR(barModules),
    "bar.layout.centerbox.center": ARR(barModules),
    "bar.layout.centerbox.end": ARR(barModules),
    "bar.layout.flowbox": ARR(barModules),
    "bar.modules.workspaces.shown": NUM,
    "bar.modules.workspaces.showLabels": BOOL,
    "bar.modules.workspaces.labels": ARR(STR),
    "bar.modules.workspaces.xalign": NUM,
    "bar.modules.workspaces.showWindows": BOOL,
    "bar.modules.dateTime.format": STR,
    "bar.modules.dateTime.detailedFormat": STR,
    // Launcher
    "launcher.style": ["lines", "round"],
    "launcher.actionPrefix": STR,
    "launcher.apps.maxResults": NUM,
    "launcher.files.maxResults": NUM,
    "launcher.files.fdOpts": ARR(STR),
    "launcher.files.shortenThreshold": NUM,
    "launcher.math.maxResults": NUM,
    "launcher.todo.notify": BOOL,
    "launcher.wallpaper.maxResults": NUM,
    "launcher.wallpaper.showAllEmpty": BOOL,
    "launcher.wallpaper.style": ["compact", "medium", "large"],
    "launcher.disabledActions": ARR(STR),
    // Notif popups
    "notifpopups.maxPopups": NUM,
    "notifpopups.expire": BOOL,
    "notifpopups.agoTime": BOOL,
    // OSDs
    "osds.volume.position": [2, 4, 8, 16],
    "osds.volume.margin": NUM,
    "osds.volume.hideDelay": NUM,
    "osds.volume.showValue": BOOL,
    "osds.brightness.position": [2, 4, 8, 16],
    "osds.brightness.margin": NUM,
    "osds.brightness.hideDelay": NUM,
    "osds.brightness.showValue": BOOL,
    "osds.lock.spacing": NUM,
    "osds.lock.caps.hideDelay": NUM,
    "osds.lock.num.hideDelay": NUM,
    // Sidebar
    "sidebar.showOnStartup": BOOL,
    // Services
    "math.maxHistory": NUM,
    "updates.interval": NUM,
    "weather.interval": NUM,
    "weather.key": STR,
    "weather.location": STR,
    "weather.imperial": BOOL,
    "cpu.interval": NUM,
    "gpu.interval": NUM,
    "memory.interval": NUM,
    "storage.interval": NUM,
    "wallpapers.paths": OBJ_ARR({ recursive: BOOL, path: STR, threshold: NUM }),
    "calendar.webcals": ARR(STR),
    "calendar.upcomingDays": NUM,
    "calendar.notify": BOOL,
    "thumbnailer.maxAttempts": NUM,
    "thumbnailer.timeBetweenAttempts": NUM,
    "thumbnailer.defaults.width": NUM,
    "thumbnailer.defaults.height": NUM,
    "thumbnailer.defaults.exact": BOOL,
} as { [k: string]: string | string[] | number[] };