mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-18 02:19:57 +00:00
.
This commit is contained in:
parent
36c2aef860
commit
919aa7c65f
6
Makefile
6
Makefile
@ -21,9 +21,9 @@ install-deps:
|
|||||||
npm install
|
npm install
|
||||||
npm prune
|
npm prune
|
||||||
for dir in app terminus-* ; do \
|
for dir in app terminus-* ; do \
|
||||||
cd $$dir; \
|
cd $$dir; \
|
||||||
npm --color always install 2>&1 | grep -v 'requires a peer'; \
|
npm install; \
|
||||||
npm --color always prune 2>&1 | grep -v 'requires a peer'; \
|
npm prune; \
|
||||||
cd ..; \
|
cd ..; \
|
||||||
done
|
done
|
||||||
make build-native
|
make build-native
|
||||||
|
@ -14,6 +14,10 @@ export async function getRootModule(): Promise<any> {
|
|||||||
...(plugins.filter(x => x.bootstrap).map(x => x.bootstrap)),
|
...(plugins.filter(x => x.bootstrap).map(x => x.bootstrap)),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (bootstrap.length == 0) {
|
||||||
|
throw new Error('Did not find any bootstrap components. Are there any plugins installed?')
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports,
|
imports,
|
||||||
bootstrap,
|
bootstrap,
|
||||||
|
@ -1,26 +1,36 @@
|
|||||||
import * as fs from 'fs-promise'
|
import * as fs from 'fs-promise'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
|
const nodeModule = (<any>global).require('module')
|
||||||
|
|
||||||
|
function normalizePath (path: string): string {
|
||||||
|
const cygwinPrefix = '/cygdrive/'
|
||||||
|
if (path.startsWith(cygwinPrefix)) {
|
||||||
|
path = path.substring(cygwinPrefix.length).replace('/', '\\')
|
||||||
|
path = path[0] + ':' + path.substring(1)
|
||||||
|
}
|
||||||
|
return path
|
||||||
|
};
|
||||||
|
|
||||||
|
(<any>global).require.main.paths.map(x => nodeModule.globalPaths.push(normalizePath(x)))
|
||||||
|
|
||||||
let nodeRequire = (<any>global).require
|
|
||||||
let module = nodeRequire('module')
|
|
||||||
nodeRequire.main.paths.map(x => module.globalPaths.push(x))
|
|
||||||
if (process.env.TERMINUS_PLUGINS) {
|
if (process.env.TERMINUS_PLUGINS) {
|
||||||
process.env.TERMINUS_PLUGINS.split(':').map(x => module.globalPaths.unshift(x))
|
process.env.TERMINUS_PLUGINS.split(':').map(x => nodeModule.globalPaths.unshift(normalizePath(x)))
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loadPlugins (): Promise<any[]> {
|
export async function loadPlugins (): Promise<any[]> {
|
||||||
let paths = module.globalPaths
|
let paths = nodeModule.globalPaths
|
||||||
let plugins: any[] = []
|
let plugins: any[] = []
|
||||||
for (let pluginDir of paths) {
|
for (let pluginDir of paths) {
|
||||||
|
pluginDir = normalizePath(pluginDir)
|
||||||
if (!await fs.exists(pluginDir)) {
|
if (!await fs.exists(pluginDir)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for (let pluginName of await fs.readdir(pluginDir)) {
|
for (let pluginName of await fs.readdir(pluginDir)) {
|
||||||
if (/^terminus-/.exec(pluginName)) {
|
if (/^terminus-/.exec(pluginName)) {
|
||||||
let pluginPath = path.join(pluginDir, pluginName)
|
let pluginPath = path.join(pluginDir, pluginName)
|
||||||
console.info(`Loading ${pluginName}: ${nodeRequire.resolve(pluginPath)}`)
|
console.info(`Loading ${pluginName}: ${(<any>global).require.resolve(pluginPath)}`)
|
||||||
try {
|
try {
|
||||||
let pluginModule = nodeRequire(pluginPath)
|
let pluginModule = (<any>global).require(pluginPath)
|
||||||
plugins.push(pluginModule)
|
plugins.push(pluginModule)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Could not load ${pluginName}:`, error)
|
console.error(`Could not load ${pluginName}:`, error)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./src",
|
"baseUrl": "./src",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es5",
|
"target": "es2015",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
|
@ -56,8 +56,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node --max-old-space-size=4096 ./node_modules/.bin/webpack --progress --color",
|
"build": "webpack --progress --color",
|
||||||
"watch": "node --max-old-space-size=4096 ./node_modules/.bin/webpack --progress --color --watch",
|
"watch": "webpack --progress --color --watch",
|
||||||
"pack": "build --dir",
|
"pack": "build --dir",
|
||||||
"postinstall": "install-app-deps",
|
"postinstall": "install-app-deps",
|
||||||
"dist": "build"
|
"dist": "build"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "7.0.12",
|
"@types/node": "7.0.12",
|
||||||
"@types/webpack-env": "1.13.0",
|
"@types/webpack-env": "^1.13.0",
|
||||||
"awesome-typescript-loader": "3.1.2",
|
"awesome-typescript-loader": "3.1.2",
|
||||||
"raw-loader": "0.5.1",
|
"raw-loader": "0.5.1",
|
||||||
"webpack": "2.3.3"
|
"webpack": "2.3.3"
|
||||||
|
@ -23,7 +23,5 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"exclude": [
|
"include": ["src"]
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,14 @@ module.exports = {
|
|||||||
loader: 'awesome-typescript-loader',
|
loader: 'awesome-typescript-loader',
|
||||||
options: {
|
options: {
|
||||||
configFileName: path.resolve(__dirname, 'tsconfig.json'),
|
configFileName: path.resolve(__dirname, 'tsconfig.json'),
|
||||||
|
typeRoots: [path.resolve(__dirname, 'node_modules/@types')],
|
||||||
paths: {
|
paths: {
|
||||||
"terminus-*": [path.resolve(__dirname, '../terminus-*')],
|
"terminus-*": [path.resolve(__dirname, '../terminus-*')],
|
||||||
"*": [path.resolve(__dirname, '../app/node_modules/*')],
|
"*": [path.resolve(__dirname, '../app/node_modules/*')],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ test: /\/schemes\//, loader: "raw-loader" },
|
{ test: /[\\\/]schemes[\\\/]/, loader: "raw-loader" },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
externals: [
|
externals: [
|
||||||
|
@ -5,24 +5,27 @@
|
|||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rm -r dist; webpack --progress --color --display-modules",
|
"build": "rm -rf dist && webpack --progress --color --display-modules",
|
||||||
"watch": "rm -r dist; webpack --progress --color --watch"
|
"watch": "rm -rf dist && webpack --progress --color --watch"
|
||||||
},
|
},
|
||||||
"author": "Eugene Pankov",
|
"author": "Eugene Pankov",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"awesome-typescript-loader": "^3.1.2",
|
|
||||||
"angular2-toaster": "3.0.1",
|
|
||||||
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.22",
|
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.22",
|
||||||
"typescript": "^2.2.2",
|
"@types/electron": "^1.4.35",
|
||||||
"@types/js-yaml": "^3.5.29",
|
"@types/js-yaml": "^3.5.29",
|
||||||
"webpack": "^2.3.3",
|
"@types/node": "^7.0.12",
|
||||||
|
"@types/webpack-env": "^1.13.0",
|
||||||
|
"angular2-toaster": "3.0.1",
|
||||||
|
"awesome-typescript-loader": "^3.1.2",
|
||||||
"bootstrap": "4.0.0-alpha.6",
|
"bootstrap": "4.0.0-alpha.6",
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
|
"json-loader": "^0.5.4",
|
||||||
"ngx-perfect-scrollbar": "^4.0.0",
|
"ngx-perfect-scrollbar": "^4.0.0",
|
||||||
"style-loader": "^0.13.1",
|
"style-loader": "^0.13.1",
|
||||||
"to-string-loader": "^1.1.5",
|
"to-string-loader": "^1.1.5",
|
||||||
"json-loader": "^0.5.4",
|
"typescript": "^2.2.2",
|
||||||
|
"webpack": "^2.3.3",
|
||||||
"yaml-loader": "^0.4.0"
|
"yaml-loader": "^0.4.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
@ -12,7 +12,7 @@ $tabs-height: 40px;
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
transition: 0.25s all;
|
transition: 0.25s ease-out all;
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -220,6 +220,14 @@ settings-tab > ngb-tabset {
|
|||||||
padding: 10px 50px 10px 20px;
|
padding: 10px 50px 10px 20px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
|
&:not(.active) {
|
||||||
|
color: $body-color;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
border-top-color: $nav-tabs-active-link-hover-border-color;
|
border-top-color: $nav-tabs-active-link-hover-border-color;
|
||||||
border-bottom-color: $nav-tabs-active-link-hover-border-color;
|
border-bottom-color: $nav-tabs-active-link-hover-border-color;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./src",
|
"baseUrl": "src",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es2015",
|
"target": "es2015",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
@ -22,7 +22,5 @@
|
|||||||
"es7"
|
"es7"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"]
|
||||||
"src"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ module.exports = {
|
|||||||
loader: 'awesome-typescript-loader',
|
loader: 'awesome-typescript-loader',
|
||||||
options: {
|
options: {
|
||||||
configFileName: path.resolve(__dirname, 'tsconfig.json'),
|
configFileName: path.resolve(__dirname, 'tsconfig.json'),
|
||||||
|
typeRoots: [path.resolve(__dirname, 'node_modules/@types')],
|
||||||
paths: {
|
paths: {
|
||||||
"terminus-*": [path.resolve(__dirname, '../terminus-*')],
|
"terminus-*": [path.resolve(__dirname, '../terminus-*')],
|
||||||
"*": [path.resolve(__dirname, '../app/node_modules/*')],
|
"*": [path.resolve(__dirname, '../app/node_modules/*')],
|
||||||
|
@ -22,7 +22,5 @@
|
|||||||
"es7"
|
"es7"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"]
|
||||||
"src"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"sass-loader": "^6.0.3",
|
"sass-loader": "^6.0.3",
|
||||||
"to-string-loader": "^1.1.5",
|
"to-string-loader": "^1.1.5",
|
||||||
|
"typescript": "^2.2.2",
|
||||||
"webpack": "2.3.3"
|
"webpack": "2.3.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
[style.background-color]='(config.store.terminal.background == "theme") ? null : config.store.terminal.colorScheme.background',
|
[style.background-color]='(config.store.terminal.background == "theme") ? null : config.store.terminal.colorScheme.background',
|
||||||
[style.color]='config.store.terminal.colorScheme.foreground',
|
[style.color]='config.store.terminal.colorScheme.foreground',
|
||||||
)
|
)
|
||||||
div
|
div
|
||||||
span([style.background-color]='config.store.terminal.colorScheme.colors[0]')
|
span([style.background-color]='config.store.terminal.colorScheme.colors[0]')
|
||||||
span([style.background-color]='config.store.terminal.colorScheme.colors[1]')
|
span([style.background-color]='config.store.terminal.colorScheme.colors[1]')
|
||||||
span([style.background-color]='config.store.terminal.colorScheme.colors[2]')
|
span([style.background-color]='config.store.terminal.colorScheme.colors[2]')
|
||||||
@ -33,7 +33,7 @@
|
|||||||
span([style.color]='config.store.terminal.colorScheme.colors[6]') T
|
span([style.color]='config.store.terminal.colorScheme.colors[6]') T
|
||||||
span
|
span
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[7]') W
|
span([style.color]='config.store.terminal.colorScheme.colors[7]') W
|
||||||
div
|
div
|
||||||
span([style.background-color]='config.store.terminal.colorScheme.colors[8]')
|
span([style.background-color]='config.store.terminal.colorScheme.colors[8]')
|
||||||
span([style.background-color]='config.store.terminal.colorScheme.colors[9]')
|
span([style.background-color]='config.store.terminal.colorScheme.colors[9]')
|
||||||
span([style.background-color]='config.store.terminal.colorScheme.colors[10]')
|
span([style.background-color]='config.store.terminal.colorScheme.colors[10]')
|
||||||
@ -58,51 +58,51 @@
|
|||||||
span([style.color]='config.store.terminal.colorScheme.colors[14]') T
|
span([style.color]='config.store.terminal.colorScheme.colors[14]') T
|
||||||
span
|
span
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[15]') W
|
span([style.color]='config.store.terminal.colorScheme.colors[15]') W
|
||||||
div
|
div
|
||||||
span
|
span
|
||||||
div
|
div
|
||||||
span john@doe-pc
|
span john@doe-pc
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[1]') $
|
span([style.color]='config.store.terminal.colorScheme.colors[1]') $
|
||||||
span webpack
|
span webpack
|
||||||
div
|
div
|
||||||
span Asset Size
|
span Asset Size
|
||||||
div
|
div
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[2]') main.js
|
span([style.color]='config.store.terminal.colorScheme.colors[2]') main.js
|
||||||
span 234 kB
|
span 234 kB
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[2]') [emitted]
|
span([style.color]='config.store.terminal.colorScheme.colors[2]') [emitted]
|
||||||
div
|
div
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[3]') big.js
|
span([style.color]='config.store.terminal.colorScheme.colors[3]') big.js
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[3]') 1.2 MB
|
span([style.color]='config.store.terminal.colorScheme.colors[3]') 1.2 MB
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[2]') [emitted]
|
span([style.color]='config.store.terminal.colorScheme.colors[2]') [emitted]
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[3]') [big]
|
span([style.color]='config.store.terminal.colorScheme.colors[3]') [big]
|
||||||
div
|
div
|
||||||
span
|
span
|
||||||
div
|
div
|
||||||
span john@doe-pc
|
span john@doe-pc
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[1]') $
|
span([style.color]='config.store.terminal.colorScheme.colors[1]') $
|
||||||
span ls -l
|
span ls -l
|
||||||
div
|
div
|
||||||
span drwxr-xr-x 1 root
|
span drwxr-xr-x 1 root
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[4]') directory
|
span([style.color]='config.store.terminal.colorScheme.colors[4]') directory
|
||||||
div
|
div
|
||||||
span -rw-r--r-- 1 root file
|
span -rw-r--r-- 1 root file
|
||||||
div
|
div
|
||||||
span -rwxr-xr-x 1 root
|
span -rwxr-xr-x 1 root
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[2]') executable
|
span([style.color]='config.store.terminal.colorScheme.colors[2]') executable
|
||||||
div
|
div
|
||||||
span -rwxr-xr-x 1 root
|
span -rwxr-xr-x 1 root
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[6]') sym
|
span([style.color]='config.store.terminal.colorScheme.colors[6]') sym
|
||||||
span ->
|
span ->
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[1]') link
|
span([style.color]='config.store.terminal.colorScheme.colors[1]') link
|
||||||
div
|
div
|
||||||
span
|
span
|
||||||
div
|
div
|
||||||
span john@doe-pc
|
span john@doe-pc
|
||||||
span([style.color]='config.store.terminal.colorScheme.colors[1]') $
|
span([style.color]='config.store.terminal.colorScheme.colors[1]') $
|
||||||
span rm -rf /
|
span rm -rf /
|
||||||
span([style.background-color]='config.store.terminal.colorScheme.cursor')
|
span([style.background-color]='config.store.terminal.colorScheme.cursor')
|
||||||
|
|
||||||
|
|
||||||
.col-md-6
|
.col-md-6
|
||||||
.form-group
|
.form-group
|
||||||
label Font
|
label Font
|
||||||
@ -136,11 +136,11 @@
|
|||||||
button.btn.btn-secondary((click)='editScheme(config.store.terminal.colorScheme)') Edit
|
button.btn.btn-secondary((click)='editScheme(config.store.terminal.colorScheme)') Edit
|
||||||
.input-group-btn
|
.input-group-btn
|
||||||
button.btn.btn-outline-danger(
|
button.btn.btn-outline-danger(
|
||||||
(click)='deleteScheme(config.store.terminal.colorScheme)',
|
(click)='deleteScheme(config.store.terminal.colorScheme)',
|
||||||
*ngIf='isCustomScheme(config.store.terminal.colorScheme)'
|
*ngIf='isCustomScheme(config.store.terminal.colorScheme)'
|
||||||
)
|
)
|
||||||
i.fa.fa-trash-o
|
i.fa.fa-trash-o
|
||||||
|
|
||||||
.form-group(*ngIf='editingColorScheme')
|
.form-group(*ngIf='editingColorScheme')
|
||||||
label Editing
|
label Editing
|
||||||
.input-group
|
.input-group
|
||||||
@ -149,7 +149,7 @@
|
|||||||
button.btn.btn-secondary((click)='saveScheme()') Save
|
button.btn.btn-secondary((click)='saveScheme()') Save
|
||||||
.input-group-btn
|
.input-group-btn
|
||||||
button.btn.btn-secondary((click)='cancelEditing()') Cancel
|
button.btn.btn-secondary((click)='cancelEditing()') Cancel
|
||||||
|
|
||||||
|
|
||||||
.form-group(*ngIf='editingColorScheme')
|
.form-group(*ngIf='editingColorScheme')
|
||||||
color-picker(
|
color-picker(
|
||||||
@ -187,23 +187,25 @@
|
|||||||
type='radio',
|
type='radio',
|
||||||
[value]='"theme"'
|
[value]='"theme"'
|
||||||
)
|
)
|
||||||
| From the app theme
|
| From theme
|
||||||
label.btn.btn-secondary
|
label.btn.btn-secondary
|
||||||
input(
|
input(
|
||||||
type='radio',
|
type='radio',
|
||||||
[value]='"colorScheme"'
|
[value]='"colorScheme"'
|
||||||
)
|
)
|
||||||
| From the terminal colors
|
| From colors
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
label Shell
|
label Shell
|
||||||
input.form-control(
|
select.form-control(
|
||||||
type='text',
|
|
||||||
[ngbTypeahead]='shellAutocomplete',
|
|
||||||
'[(ngModel)]'='config.store.terminal.shell',
|
'[(ngModel)]'='config.store.terminal.shell',
|
||||||
(ngModelChange)='config.save()',
|
(ngModelChange)='config.save()',
|
||||||
)
|
)
|
||||||
|
option(
|
||||||
|
*ngFor='let shell of shells',
|
||||||
|
[ngValue]='shell.command'
|
||||||
|
) {{shell.name}}
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
label Terminal bell
|
label Terminal bell
|
||||||
br
|
br
|
||||||
|
@ -10,13 +10,18 @@ import { ConfigService, HostAppService, Platform } from 'terminus-core'
|
|||||||
import { TerminalColorSchemeProvider, ITerminalColorScheme } from '../api'
|
import { TerminalColorSchemeProvider, ITerminalColorScheme } from '../api'
|
||||||
|
|
||||||
|
|
||||||
|
interface IShell {
|
||||||
|
name: string
|
||||||
|
command: string
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./terminalSettingsTab.component.pug'),
|
template: require('./terminalSettingsTab.component.pug'),
|
||||||
styles: [require('./terminalSettingsTab.component.scss')],
|
styles: [require('./terminalSettingsTab.component.scss')],
|
||||||
})
|
})
|
||||||
export class TerminalSettingsTabComponent {
|
export class TerminalSettingsTabComponent {
|
||||||
fonts: string[] = []
|
fonts: string[] = []
|
||||||
shells: string[] = []
|
shells: IShell[] = []
|
||||||
colorSchemes: ITerminalColorScheme[] = []
|
colorSchemes: ITerminalColorScheme[] = []
|
||||||
equalComparator = equal
|
equalComparator = equal
|
||||||
editingColorScheme: ITerminalColorScheme
|
editingColorScheme: ITerminalColorScheme
|
||||||
@ -44,11 +49,22 @@ export class TerminalSettingsTabComponent {
|
|||||||
this.fonts.sort()
|
this.fonts.sort()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (this.hostApp.platform == Platform.Windows) {
|
||||||
|
this.shells = [
|
||||||
|
{ name: 'CMD', command: 'cmd.exe' },
|
||||||
|
{ name: 'PowerShell', command: 'powershell.exe' },
|
||||||
|
]
|
||||||
|
const wslPath =`${process.env.windir}\\system32\\bash.exe`
|
||||||
|
if (await fs.exists(wslPath)) {
|
||||||
|
this.shells.push({ name: 'Bash on Windows', command: wslPath })
|
||||||
|
}
|
||||||
|
}
|
||||||
if (this.hostApp.platform == Platform.Linux || this.hostApp.platform == Platform.macOS) {
|
if (this.hostApp.platform == Platform.Linux || this.hostApp.platform == Platform.macOS) {
|
||||||
this.shells = (await fs.readFile('/etc/shells', 'utf-8'))
|
this.shells = (await fs.readFile('/etc/shells', 'utf-8'))
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map(x => x.trim())
|
.map(x => x.trim())
|
||||||
.filter(x => x && !x.startsWith('#'))
|
.filter(x => x && !x.startsWith('#'))
|
||||||
|
.map(x => ({ name: x, command: x }))
|
||||||
}
|
}
|
||||||
this.colorSchemes = (await Promise.all(this.colorSchemeProviders.map(x => x.getSchemes()))).reduce((a, b) => a.concat(b))
|
this.colorSchemes = (await Promise.all(this.colorSchemeProviders.map(x => x.getSchemes()))).reduce((a, b) => a.concat(b))
|
||||||
}
|
}
|
||||||
@ -61,10 +77,6 @@ export class TerminalSettingsTabComponent {
|
|||||||
.map(list => Array.from(new Set(list)))
|
.map(list => Array.from(new Set(list)))
|
||||||
}
|
}
|
||||||
|
|
||||||
shellAutocomplete = (text$: Observable<string>) => {
|
|
||||||
return text$.map(_ => ['auto'].concat(this.shells))
|
|
||||||
}
|
|
||||||
|
|
||||||
editScheme (scheme: ITerminalColorScheme) {
|
editScheme (scheme: ITerminalColorScheme) {
|
||||||
this.editingColorScheme = scheme
|
this.editingColorScheme = scheme
|
||||||
this.schemeChanged = false
|
this.schemeChanged = false
|
||||||
|
@ -23,7 +23,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
[Platform.macOS]: {
|
[Platform.macOS]: {
|
||||||
terminal: {
|
terminal: {
|
||||||
font: 'Menlo',
|
font: 'Menlo',
|
||||||
shell: 'zsh',
|
shell: '/bin/zsh',
|
||||||
},
|
},
|
||||||
hotkeys: {
|
hotkeys: {
|
||||||
'new-tab': [
|
'new-tab': [
|
||||||
@ -49,7 +49,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
[Platform.Linux]: {
|
[Platform.Linux]: {
|
||||||
terminal: {
|
terminal: {
|
||||||
font: 'Liberation Mono',
|
font: 'Liberation Mono',
|
||||||
shell: 'auto',
|
shell: '/bin/bash',
|
||||||
},
|
},
|
||||||
hotkeys: {
|
hotkeys: {
|
||||||
'new-tab': [
|
'new-tab': [
|
||||||
|
@ -22,8 +22,5 @@
|
|||||||
"es7"
|
"es7"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"compileOnSave": false,
|
"include": ["src"]
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,9 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ test: /schemes\/.*$/, use: "raw-loader" },
|
|
||||||
{ test: /\.pug$/, use: ['apply-loader', 'pug-loader'] },
|
{ test: /\.pug$/, use: ['apply-loader', 'pug-loader'] },
|
||||||
{ test: /\.scss$/, use: ['to-string-loader', 'css-loader', 'sass-loader'] },
|
{ test: /\.scss$/, use: ['to-string-loader', 'css-loader', 'sass-loader'] },
|
||||||
{ test: /\.css$/, use: ['to-string-loader', 'css-loader', 'sass-loader'] },
|
{ test: /\.css$/, use: ['to-string-loader', 'css-loader'] },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
externals: [
|
externals: [
|
||||||
|
@ -14,7 +14,5 @@
|
|||||||
"es7"
|
"es7"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"exclude": [
|
"include": ["src"]
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user