1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-22 20:55:03 +03:00

added msys2 built-in profiles - fixes #2962

This commit is contained in:
Eugene Pankov 2021-09-02 23:52:31 +02:00
parent 601fff454d
commit b7ac65fce0
3 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="36.777mm" height="36.777mm" version="1.1" viewBox="0 0 36.777 36.777" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g transform="translate(-122.71 -169.49)">
<g transform="translate(36.844 36.777)" fill="#999">
<path d="m118.48 154.39c-0.21263-0.77937-0.60053-0.53763-3.7786-0.53763-4.2381 0-4.51 0.21718-2.6541-2.4472 2.457-3.5274 3.4906-5.924 2.8085-6.965-0.4719-0.72022-1.0125-0.62449-1.9271 0.34127-0.84859 0.89603-1.8689 0.41779-1.8689-0.95587 0-2.012 2.8056-3.9999 5.3894-3.9922 1.614 5e-3 2.4364 0.4039 3.2158 1.5604 1.1203 1.6624 0.73145 3.8557-1.134 6.397-1.5438 2.1031-0.73385 3.6126 0.95572 1.7811 1.4629-1.6879 1.5595 0.86073 1.491 1.7028-0.2309 2.6962-2.077 4.6571-2.4976 3.1153z" fill="#999" stroke-width=".26458"/>
</g>
<g stroke-width=".50508">
<path transform="matrix(.26458 0 0 .26458 122.71 169.49)" d="m9.2551 97.323c-1.1562-0.7536-0.31598-3.2576 3.2531-9.6944 5.9813-10.787 19.737-40.139 25.544-54.507 3.4471-8.5282 3.725-10.717 1.5808-12.448-1.1414-0.92159-1.2907-1.285-0.8373-2.0393 1.6696-2.7778 11.294-3.9702 15.358-1.9029 4.5286 2.3035 6.6098 7.8684 9.3407 24.976 2.1781 13.645 3.7862 22.817 4.0853 23.301 0.80633 1.3047 2.407-1.8854 8.4838-16.908 8.5152-21.05 12.267-27.812 16.696-30.091 1.962-1.0097 3.3986-1.3036 7.1792-1.469 6.0598-0.26504 6.2396-0.12365 6.2324 4.9003-9e-3 6.5148-0.30491 7.4305-2.886 8.9432-4.8227 2.8263-8.1944 7.5856-8.2016 11.577-0.0099 5.4798 4.0769 7.1796 7.8338 3.2583 0.7854-0.81978 1.6128-1.4905 1.8386-1.4905s0.4119 2.1024 0.4135 4.672c2e-3 2.5696 0.21897 5.9911 0.48302 7.6033 0.54393 3.3211 0.62062 3.1596-6.937 14.613-4.1978 6.362-4.5659 7.2622-3.4332 8.3967 0.6867 0.6878 2.275 0.85452 9.4046 0.9872l8.5784 0.15964 2.1125 2.798c2.5812 3.4188 2.7454 5.2892 0.6996 7.9714-1.8668 2.4475-5.6125 5.1245-8.1753 5.8427-3.7415 1.0486-8.4103-1.013-12.47-5.5062-5.2081-5.7647-7.5396-14.899-8.239-32.278-0.24251-6.0259-0.52471-8.6733-0.91083-8.5446-0.30771 0.10257-3.7635 7.5753-7.6796 16.606-12.423 28.649-13.924 31.318-17.16 30.506-2.025-0.50825-5.0993-4.014-7.2197-8.2328-4.1934-8.3436-6.5579-19.088-7.6998-34.988-0.32917-4.5836-0.78831-8.5453-1.0203-8.8039-0.51357-0.57238-2.2088 3.1103-7.8764 17.11-7.6151 18.811-10.569 24.729-14.439 28.927-3.2899 3.5691-11.857 7.1072-13.933 5.7541z" fill="#f9f9f9"/>
<g fill="#d35e64">
<path transform="matrix(.26458 0 0 .26458 122.71 169.49)" d="m75.664 122.46c-1.2249-0.96348-1.34-1.3378-1.2045-3.9143l0.14983-2.849h1.7351c1.6821 0 1.7361 0.0617 1.7678 2.0203l0.03266 2.0203 2.6573 0.15286c2.0366 0.11715 2.7277-0.0306 2.9587-0.63248 0.60362-1.573-0.4054-3.3932-3.728-6.7251-1.8658-1.871-3.9062-4.071-4.5342-4.8889-1.4589-1.8999-1.5437-5.2283-0.17634-6.917 0.88504-1.093 1.3438-1.1924 5.5028-1.1924 5.1756 0 6.3427 0.6042 6.8174 3.5294 0.4355 2.6837-0.25445 4.5518-1.6811 4.5518-1.0066 0-1.2918-0.36987-1.7526-2.2728-0.50287-2.0764-0.69656-2.287-2.2406-2.4363-0.92959-0.0899-2.2269-0.0288-2.883 0.13589-2.2502 0.56476-1.4227 2.1852 3.6054 7.0604l4.7982 4.6523v3.4083c0 5.2086-0.1649 5.3622-5.758 5.3622-4.0289 0-4.9088-0.1545-6.0667-1.0653z"/>
<path transform="matrix(.26458 0 0 .26458 122.71 169.49)" d="m95.774 130.77c0.17811-1.0634 0.45153-3.9789 0.60759-6.479 0.26576-4.2574 0.13359-5.1223-2.0838-13.637-1.3021-5.0002-2.4843-9.6028-2.6269-10.228-0.22442-0.98323-0.05554-1.1364 1.2529-1.1364 0.83175 0 1.7665 0.30628 2.0771 0.68062 0.31067 0.37434 1.1434 3.2722 1.8506 6.4397 1.5777 7.0668 1.7138 7.5269 2.2267 7.5269 0.6014 0 1.3464-2.1279 2.8279-8.0775 1.4724-5.913 1.8338-6.5697 3.6148-6.5697 1.4844 0 1.7436-1.6442-2.6503 16.81-1.7714 7.44-3.5154 14.145-3.8755 14.9-0.44524 0.93333-1.1172 1.4255-2.0998 1.5381-1.4138 0.162-1.4381 0.1237-1.1212-1.7678z"/>
<path transform="matrix(.26458 0 0 .26458 122.71 169.49)" d="m123.48 114.84-5e-3 3.943s0.15696 3.7633-0.40862 4.2971c-0.57517 0.54286-2.7589 0.44883-5.7918 0.44883-5.2692 0-5.5498-0.0541-6.3116-1.2168-0.5398-0.82384-0.74743-2.0878-0.64299-3.9143 0.15002-2.6234 0.19573-2.6976 1.6626-2.6976 1.1206 0 1.5476 0.25963 1.6612 1.0102 0.49591 3.2773 0.50129 3.283 3.0918 3.283 5.0292 0 4.4851-2.8078-1.5873-8.1914-3.7309-3.3076-4.9304-5.0912-4.9196-7.3146 0.0189-3.8712 1.6713-5.2021 6.4586-5.2021 5.461 0 7.1715 1.3886 7.1715 5.8219 0 3.2126-3.0514 3.8315-3.5569 0.7215-0.42706-2.6273-0.8307-3.0079-3.1904-3.0079-2.2332 0-3.3512 0.66414-3.3585 1.995-2e-3 0.43058 2.2137 2.8835 4.9245 5.4509"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -32,6 +32,7 @@ import { Cygwin64ShellProvider } from './shells/cygwin64'
import { GitBashShellProvider } from './shells/gitBash'
import { LinuxDefaultShellProvider } from './shells/linuxDefault'
import { MacOSDefaultShellProvider } from './shells/macDefault'
import { MSYS2ShellProvider } from './shells/msys2'
import { POSIXShellsProvider } from './shells/posix'
import { PowerShellCoreShellProvider } from './shells/powershellCore'
import { WindowsDefaultShellProvider } from './shells/winDefault'
@ -71,6 +72,7 @@ import { LocalProfilesService } from './profiles'
{ provide: ShellProvider, useClass: Cygwin64ShellProvider, multi: true },
{ provide: ShellProvider, useClass: GitBashShellProvider, multi: true },
{ provide: ShellProvider, useClass: POSIXShellsProvider, multi: true },
{ provide: ShellProvider, useClass: MSYS2ShellProvider, multi: true },
{ provide: ShellProvider, useClass: WSLShellProvider, multi: true },
{ provide: ShellProvider, useClass: VSDevToolsProvider, multi: true },

View File

@ -0,0 +1,40 @@
import * as fs from 'fs/promises'
import * as path from 'path'
import { Injectable } from '@angular/core'
import { HostAppService, Platform } from 'tabby-core'
import { ShellProvider, Shell } from '../api'
/** @hidden */
@Injectable()
export class MSYS2ShellProvider extends ShellProvider {
constructor (
private hostApp: HostAppService,
) {
super()
}
async provide (): Promise<Shell[]> {
if (this.hostApp.platform !== Platform.Windows) {
return []
}
const msys2Path = path.resolve(process.env.SystemRoot ?? 'C:\\Windows', '../msys64')
try {
await fs.access(msys2Path)
} catch {
return []
}
const environments = ['msys', 'mingw64', 'clang64', 'ucrt64']
return environments.map(e => ({
id: `msys2-${e}`,
name: `MSYS2 (${e.toUpperCase()})`,
command: path.join(msys2Path, 'msys2_shell.cmd'),
args: ['-defterm', '-here', '-no-start', '-' + e],
icon: require('../icons/msys2.svg'),
env: {},
}))
}
}