forked from amiechen/pretzel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setting.js
34 lines (27 loc) · 776 Bytes
/
setting.js
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
const settings = require("electron-settings");
const getKeycode = function() {
return settings.get("user-keycode") || "`";
};
const setKeycode = function(code) {
// default to backtick
code = code || "`";
settings.set("user-keycode", code);
};
const getKeymodifier = function() {
return settings.get("user-keymodifier") || "Cmd";
};
const setKeymodifier = function(code) {
settings.set("user-keymodifier", code);
};
const getTheme = function() {
return settings.get("theme");
};
const setTheme = function(theme) {
settings.set("theme", theme);
};
exports.getKeymodifier = getKeymodifier;
exports.setKeymodifier = setKeymodifier;
exports.getKeycode = getKeycode;
exports.setKeycode = setKeycode;
exports.getTheme = getTheme;
exports.setTheme = setTheme;