forked from actuallymentor/battery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
38 lines (28 loc) · 943 Bytes
/
main.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
const { app } = require( 'electron' )
const { alert, log } = require( './modules/helpers' )
const { set_initial_interface } = require( './modules/interface' )
// Enable auto-updates
require( 'update-electron-app' )( {
logger: {
log: ( ...data ) => log( `[ update-electron-app ] `, ...data )
}
} )
/* ///////////////////////////////
// Event listeners
// /////////////////////////////*/
app.whenReady().then( set_initial_interface )
/* ///////////////////////////////
// Global config
// /////////////////////////////*/
// Hide dock entry
app.dock.hide()
/* ///////////////////////////////
// Debugging
// /////////////////////////////*/
const debug = false
if( debug ) app.whenReady().then( async () => {
await alert( __dirname )
await alert( Object.keys( process.env ).join( '\n' ) )
const { HOME, PATH, USER } = process.env
await alert( `HOME: ${ HOME }\n\nPATH: ${ PATH }\n\nUSER: ${ USER }` )
} )