forked from zaaack/ELaunch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.default.js
138 lines (132 loc) · 4.2 KB
/
config.default.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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
const os = require('os')
const home = os.homedir()
module.exports = {
title: 'ELaunch',
width: 600,
height: 60,
maxHeight: 500,
language: null,
autoLaunch: true,
position: 'center', // 'center' or {x: 100, y:200}
// default is your primary display, you can change it by setting display id(integer),
// get all ids by require('electron').screen.getAllDisplays().map(d=>d.id)
display: 'primary',
shortcuts: {
toggle: { default: 'Super+Space' },
selectPrevItem: { default: 'Up' },
selectNextItem: { default: 'Down' },
selectPrevItemOpt: { default: 'Left' },
selectNextItemOpt: { default: 'Right' },
},
plugins: {
app: {
path: `${__dirname}/../plugins/app/index.js`,
enable: true, // whether the plugin is enable, default is true
default: true, // default plugin don't need to input key
config: {
darwin: {
appPaths: ['/Applications', `${home}/Applications`],
},
linux: {
appPaths: ['/usr/share/applications',
'/usr/local/share/applications',
`${home}/.local/share/applications`],
iconPaths: ['/usr/share/icons',
`${home}/.local/share/icons`,
'/usr/share/pixmaps'],
},
win32: {
},
},
commands: {
app: {},
},
},
find: {
path: `${__dirname}/../plugins/find/index.js`,
config: {
// type: 'locate',
// db_path: require('os').homedir()+'/.ELaunch/find/locate.db',
// rootDir: '/home',
// exclude_patt: '\\/\\.|node_modules', //exclude hidden files
// use_regex: false,
// locate_limit: 1000,
linux: {
// type: 'find',
// include_path: ['~/'],
// excludePaths: ['**/.*','**/node_*'],
// maxdepth: 10,
type: 'locate',
rootDir: '~',
// exclude_patt: '\\/\\.|node_modules|Programs' //exclude hidden files
},
darwin: {
// Notice: mdfind only search the first path in `include_path`,
// and ignore `excludePaths`, plz set excludePaths in spotlight settings
type: 'mdfind',
rootDir: '~/',
excludePaths: ['**/.*', '**/node_*', '**/Library', '**/Contents'],
// /(?!(.*?/\.)|(.*?/node_)).*?a/
},
limit: 20,
},
commands: {
find: {},
},
},
websearch: {
path: `${__dirname}/../plugins/websearch/index.js`,
commands: {
bi: {
engine: 'Bing',
url: 'https://www.bing.com/search/?q=%s',
icon: 'https://cn.bing.com/sa/simg/bing_p_rr_teal_min.ico',
},
bd: {
engine: 'Baidu',
url: 'https://www.baidu.com/s?wd=%s',
icon: 'https://www.baidu.com/img/baidu.svg',
},
gh: {
engine: 'Github',
url: 'http://github.com/search?q=%s',
icon: 'https://github.com/fluidicon.png',
},
},
},
shell: {
path: `${__dirname}/../plugins/shell/index.js`,
config: {
terminal: 'node', //default
//terminal: 'platform', //you can set `platform` to auto use different shell in different platform: gnome-terminal for linux, Terminal.app for MacOS and cmd.exe for windows
// use custom shell to run commands
// terminal: 'gnome-terminal -x $SHELL -c \'%s;exec $SHELL\'',
//terminal: `osapath -e "tell application \\"Terminal\\""
// -e "activate"
// -e "do path \\"%s\\""
// -e "end tell"` // for mac
//terminal: `osapath -e "tell application \\"iTerm\\""
// -e "activate"
// -e "set t to create tab with default profile window 1"
// -e "write current session in t text \\"%s\\""
// -e "end tell"` //for iterm2 in mac
//terminal: 'cmd /k "%s"' //for windows
},
commands: {
'>': {},
},
},
youdao: {
path: `${__dirname}/../plugins/youdao/index.js`,
commands: {
yd: {},
},
},
calc: {
path: `${__dirname}/../plugins/calc/index.js`,
commands: {
calc: {},
},
},
},
}