Skip to content

Commit

Permalink
added support for custom color schemes for local shell profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Oct 20, 2024
1 parent 2ecccad commit e84cbd8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 26 deletions.
58 changes: 35 additions & 23 deletions tabby-local/src/components/localProfileSettings.component.pug
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
command-line-editor([model]='profile.options')
ul.nav-tabs(ngbNav, #nav='ngbNav')
li(ngbNavItem)
a(ngbNavLink, translate) General
ng-template(ngbNavContent)
command-line-editor([model]='profile.options')

.form-line(*ngIf='uac?.isAvailable')
.header
.title(translate) Run as administrator
toggle(
[(ngModel)]='profile.options.runAsAdministrator',
)
.form-line(*ngIf='uac?.isAvailable')
.header
.title(translate) Run as administrator
toggle(
[(ngModel)]='profile.options.runAsAdministrator',
)

.mb-3
label(translate) Working directory
.mb-3
label(translate) Working directory

.input-group
input.form-control(
type='text',
placeholder='Home directory',
[(ngModel)]='profile.options.cwd'
)
button.btn.btn-secondary((click)='pickWorkingDirectory()')
i.fas.fa-folder-open

.mb-3
label(translate) Environment
environment-editor(
type='text',
[(model)]='profile.options.env',
)
.input-group
input.form-control(
type='text',
placeholder='Home directory',
[(ngModel)]='profile.options.cwd'
)
button.btn.btn-secondary((click)='pickWorkingDirectory()')
i.fas.fa-folder-open

.mb-3
label(translate) Environment
environment-editor(
type='text',
[(model)]='profile.options.env',
)

li(ngbNavItem)
a(ngbNavLink, translate) Colors
ng-template(ngbNavContent)
color-scheme-selector([(model)]='profile.terminalColorScheme')

div([ngbNavOutlet]='nav')
5 changes: 2 additions & 3 deletions tabby-terminal/src/tabContextMenu.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import deepClone from 'clone-deep'
import { Injectable, Optional, Inject } from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { BaseTabComponent, TabContextMenuItemProvider, NotificationsService, MenuItemOptions, TranslateService, SplitTabComponent, PromptModalComponent, ConfigService, PartialProfile, Profile } from 'tabby-core'
Expand Down Expand Up @@ -180,9 +181,7 @@ export class SaveAsProfileContextMenu extends TabContextMenuItemProvider {
return
}

const options = {
...tab.profile.options,
}
const options = deepClone(tab.profile.options)

const cwd = await tab.session?.getWorkingDirectory() ?? tab.profile.options.cwd
if (cwd) {
Expand Down

0 comments on commit e84cbd8

Please sign in to comment.