mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-29 05:34:36 +00:00
custom Electron flags support (fixes #754)
This commit is contained in:
@@ -19,12 +19,16 @@ export class Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.commandLine.appendSwitch('disable-http-cache')
|
app.commandLine.appendSwitch('disable-http-cache')
|
||||||
app.commandLine.appendSwitch('force_discrete_gpu', '0')
|
|
||||||
app.commandLine.appendSwitch('lang', 'EN')
|
app.commandLine.appendSwitch('lang', 'EN')
|
||||||
|
|
||||||
|
for (const flag of configData.flags || [['force_discrete_gpu', '0']]) {
|
||||||
|
console.log('Setting Electron flag:', flag.join('='))
|
||||||
|
app.commandLine.appendSwitch(flag[0], flag[1])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init () {
|
init () {
|
||||||
electron.screen.on('display-metrics-changed', () => this.broadcast('host:display-metrics-changed'))
|
electron.screen.on('display-metrics-changed', () => this.broadcast('host:display-metrics-changed'))
|
||||||
}
|
}
|
||||||
|
|
||||||
async newWindow (options?: WindowOptions): Promise<Window> {
|
async newWindow (options?: WindowOptions): Promise<Window> {
|
||||||
|
@@ -12,3 +12,7 @@ appearance:
|
|||||||
vibrancyType: 'blur'
|
vibrancyType: 'blur'
|
||||||
enableAnalytics: true
|
enableAnalytics: true
|
||||||
enableWelcomeTab: true
|
enableWelcomeTab: true
|
||||||
|
electronFlags:
|
||||||
|
- ['disable-http-cache']
|
||||||
|
- ['force_discrete_gpu', '0']
|
||||||
|
- ['lang', 'EN']
|
||||||
|
Reference in New Issue
Block a user