mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-03 06:11:57 +08:00
include the default color scheme in the list
This commit is contained in:
parent
65756a62bc
commit
1450e0436f
35
tabby-terminal/src/colorSchemes.ts
Normal file
35
tabby-terminal/src/colorSchemes.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { TerminalColorScheme } from './api/interfaces'
|
||||
import { TerminalColorSchemeProvider } from './api/colorSchemeProvider'
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class DefaultColorSchemes extends TerminalColorSchemeProvider {
|
||||
static defaultColorScheme: TerminalColorScheme = {
|
||||
name: 'Tabby Default',
|
||||
foreground: '#cacaca',
|
||||
background: '#171717',
|
||||
cursor: '#bbbbbb',
|
||||
colors: [
|
||||
'#000000',
|
||||
'#ff615a',
|
||||
'#b1e969',
|
||||
'#ebd99c',
|
||||
'#5da9f6',
|
||||
'#e86aff',
|
||||
'#82fff7',
|
||||
'#dedacf',
|
||||
'#313131',
|
||||
'#f58c80',
|
||||
'#ddf88f',
|
||||
'#eee5b2',
|
||||
'#a5c7ff',
|
||||
'#ddaaff',
|
||||
'#b7fff9',
|
||||
'#ffffff',
|
||||
],
|
||||
}
|
||||
|
||||
async getSchemes (): Promise<TerminalColorScheme[]> {
|
||||
return [DefaultColorSchemes.defaultColorScheme]
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
import { ConfigProvider, Platform } from 'tabby-core'
|
||||
import { DefaultColorSchemes } from './colorSchemes'
|
||||
|
||||
/** @hidden */
|
||||
export class TerminalConfigProvider extends ConfigProvider {
|
||||
@ -32,30 +33,9 @@ export class TerminalConfigProvider extends ConfigProvider {
|
||||
wordSeparator: ' ()[]{}\'"',
|
||||
colorScheme: {
|
||||
__nonStructural: true,
|
||||
name: 'Wombat',
|
||||
foreground: '#cacaca',
|
||||
background: '#171717',
|
||||
cursor: '#bbbbbb',
|
||||
colors: [
|
||||
'#000000',
|
||||
'#ff615a',
|
||||
'#b1e969',
|
||||
'#ebd99c',
|
||||
'#5da9f6',
|
||||
'#e86aff',
|
||||
'#82fff7',
|
||||
'#dedacf',
|
||||
'#313131',
|
||||
'#f58c80',
|
||||
'#ddf88f',
|
||||
'#eee5b2',
|
||||
'#a5c7ff',
|
||||
'#ddaaff',
|
||||
'#b7fff9',
|
||||
'#ffffff',
|
||||
],
|
||||
selection: null,
|
||||
cursorAccent: null,
|
||||
...DefaultColorSchemes.defaultColorScheme,
|
||||
},
|
||||
customColorSchemes: [],
|
||||
warnOnMultilinePaste: true,
|
||||
|
@ -33,6 +33,7 @@ import { CopyPasteContextMenu, MiscContextMenu, LegacyContextMenu, ReconnectCont
|
||||
import { Frontend } from './frontends/frontend'
|
||||
import { XTermFrontend, XTermWebGLFrontend } from './frontends/xtermFrontend'
|
||||
import { TerminalCLIHandler } from './cli'
|
||||
import { DefaultColorSchemes } from './colorSchemes'
|
||||
|
||||
/** @hidden */
|
||||
@NgModule({
|
||||
@ -61,6 +62,7 @@ import { TerminalCLIHandler } from './cli'
|
||||
{ provide: TabContextMenuItemProvider, useClass: ReconnectContextMenu, multi: true },
|
||||
|
||||
{ provide: CLIHandler, useClass: TerminalCLIHandler, multi: true },
|
||||
{ provide: TerminalColorSchemeProvider, useClass: DefaultColorSchemes, multi: true },
|
||||
],
|
||||
declarations: [
|
||||
ColorPickerComponent,
|
||||
|
Loading…
Reference in New Issue
Block a user