diff --git a/.all-contributorsrc b/.all-contributorsrc index e6040402..021fcdad 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1310,6 +1310,15 @@ "contributions": [ "code" ] + }, + { + "login": "fireblue", + "name": "fireblue", + "avatar_url": "https://avatars.githubusercontent.com/u/1034929?v=4", + "profile": "https://github.com/fireblue", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.de-DE.md b/README.de-DE.md index 13175c0b..cb222f0a 100644 --- a/README.de-DE.md +++ b/README.de-DE.md @@ -340,6 +340,7 @@ Dank geht an diese wunderbaren Menschen ([emoji key](https://allcontributors.org Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.es-ES.md b/README.es-ES.md index 20202a6c..416cab43 100644 --- a/README.es-ES.md +++ b/README.es-ES.md @@ -342,6 +342,7 @@ Gracias a estas maravillosas personas ([emoji key](https://allcontributors.org/d Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.id-ID.md b/README.id-ID.md index 973e7c74..b33e1980 100644 --- a/README.id-ID.md +++ b/README.id-ID.md @@ -339,6 +339,7 @@ Terima kasih kepada mereka yang telah membantu ([emoji key](https://allcontribut Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.it-IT.md b/README.it-IT.md index 679a5e3c..065a5340 100644 --- a/README.it-IT.md +++ b/README.it-IT.md @@ -335,6 +335,7 @@ Grazie a queste persone meravigliose ([emoji key](https://allcontributors.org/do Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.ja-JP.md b/README.ja-JP.md index 270ba75e..8c161d60 100644 --- a/README.ja-JP.md +++ b/README.ja-JP.md @@ -350,6 +350,7 @@ WindowsδΈŠγ§γ―γ€`Tabby.exe`γŒγ‚γ‚‹ε ΄ζ‰€γ¨εŒγ˜ε ΄ζ‰€γ«`data`フォル Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.ko-KR.md b/README.ko-KR.md index e3c8170a..f56bae66 100644 --- a/README.ko-KR.md +++ b/README.ko-KR.md @@ -334,6 +334,7 @@ Pull requests and plugins are welcome! Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.md b/README.md index 119cba65..a5df9ed2 100644 --- a/README.md +++ b/README.md @@ -356,6 +356,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.pt-BR.md b/README.pt-BR.md index f7b14f83..e920e49d 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -343,6 +343,7 @@ Obrigado vai para essas pessoas maravilhosas ([emoji key](https://allcontributor Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.ru-RU.md b/README.ru-RU.md index d5c1c803..bf71870d 100644 --- a/README.ru-RU.md +++ b/README.ru-RU.md @@ -335,6 +335,7 @@ Pull-запросы ΠΈ ΠΏΠ»Π°Π³ΠΈΠ½Ρ‹ ΠΏΡ€ΠΈΠ²Π΅Ρ‚ΡΡ‚Π²ΡƒΡŽΡ‚ΡΡ! Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/README.zh-CN.md b/README.zh-CN.md index f772043c..162512ad 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -334,6 +334,7 @@ Mxmilu
Mxmilu

πŸ’» Charles Buffington
Charles Buffington

πŸ’» Yu Qin
Yu Qin

πŸ’» + fireblue
fireblue

πŸ’» diff --git a/app/lib/window.ts b/app/lib/window.ts index d1887fae..b7e71a97 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -26,7 +26,7 @@ abstract class GlasstronWindow extends BrowserWindow { abstract setBlur (_: boolean) } -const macOSVibrancyType: any = process.platform === 'darwin' ? compareVersions(macOSRelease().version || '0.0', '10.14', '>=') ? 'under-window' : 'dark' : null +const macOSVibrancyType: any = process.platform === 'darwin' ? compareVersions(macOSRelease().version || '0.0', '10.14', '>=') ? 'fullscreen-ui' : 'dark' : null const activityIcon = nativeImage.createFromPath(`${app.getAppPath()}/assets/activity.png`) diff --git a/package.json b/package.json index ea9a461f..ddb78623 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "html-loader": "4.2.0", "json-loader": "^0.5.7", "lru-cache": "^6.0.0", - "macos-release": "^3.1.0", + "macos-release": "^3.3.0", "ngx-toastr": "^16.0.2", "node-abi": "^3.65.0", "npmlog": "6.0.2", diff --git a/tabby-core/src/components/splitTab.component.ts b/tabby-core/src/components/splitTab.component.ts index 1e4f4c29..936dd0e4 100644 --- a/tabby-core/src/components/splitTab.component.ts +++ b/tabby-core/src/components/splitTab.component.ts @@ -821,7 +821,13 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit if (this.disableDynamicTitle) { return } - this.setTitle([...new Set(this.getAllTabs().map(x => x.title))].join(' | ')) + const titles = [ + this.getFocusedTab()?.title, + ...this.getAllTabs() + .filter(x => x !== this.getFocusedTab()) + .map(x => x.title), + ] + this.setTitle([...new Set(titles)].join(' | ')) } private attachTabView (tab: BaseTabComponent) { @@ -837,6 +843,10 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit }) } + tab.subscribeUntilDestroyed( + this.observeUntilChildDetached(tab, tab.focused$), + () => this.updateTitle(), + ) tab.subscribeUntilDestroyed( this.observeUntilChildDetached(tab, tab.titleChange$), () => this.updateTitle(), diff --git a/tabby-terminal/src/api/baseTerminalTab.component.ts b/tabby-terminal/src/api/baseTerminalTab.component.ts index 4cf02abc..6723e3fc 100644 --- a/tabby-terminal/src/api/baseTerminalTab.component.ts +++ b/tabby-terminal/src/api/baseTerminalTab.component.ts @@ -13,6 +13,7 @@ import { ResizeEvent, BaseTerminalProfile } from './interfaces' import { TerminalDecorator } from './decorator' import { SearchPanelComponent } from '../components/searchPanel.component' import { MultifocusService } from '../services/multifocus.service' +import { getTerminalBackgroundColor } from '../helpers' const INACTIVE_TAB_UNLOAD_DELAY = 1000 * 30 @@ -575,14 +576,7 @@ export class BaseTerminalTabComponent

extends Bas configure (): void { this.frontend?.configure(this.profile) - if (!this.themes.findCurrentTheme().followsColorScheme && this.config.store.terminal.background === 'colorScheme') { - const scheme = this.profile.terminalColorScheme ?? this.config.store.terminal.colorScheme - if (scheme.background) { - this.backgroundColor = scheme.background - } - } else { - this.backgroundColor = null - } + this.backgroundColor = getTerminalBackgroundColor(this.config, this.themes, this.profile.terminalColorScheme) } zoomIn (): void { diff --git a/tabby-terminal/src/frontends/xtermFrontend.ts b/tabby-terminal/src/frontends/xtermFrontend.ts index 26961e77..534e3bb7 100644 --- a/tabby-terminal/src/frontends/xtermFrontend.ts +++ b/tabby-terminal/src/frontends/xtermFrontend.ts @@ -1,3 +1,4 @@ +import deepEqual from 'deep-equal' import { BehaviorSubject, filter, firstValueFrom, takeUntil } from 'rxjs' import { Injector } from '@angular/core' import { ConfigService, getCSSFontFamily, getWindows10Build, HostAppService, HotkeysService, Platform, PlatformService, ThemesService } from 'tabby-core' @@ -11,9 +12,9 @@ import { Unicode11Addon } from '@xterm/addon-unicode11' import { SerializeAddon } from '@xterm/addon-serialize' import { ImageAddon } from '@xterm/addon-image' import { CanvasAddon } from '@xterm/addon-canvas' -import './xterm.css' -import deepEqual from 'deep-equal' import { BaseTerminalProfile, TerminalColorScheme } from '../api/interfaces' +import { getTerminalBackgroundColor } from '../helpers' +import './xterm.css' const COLOR_NAMES = [ 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', @@ -361,21 +362,21 @@ export class XTermFrontend extends Frontend { } private configureColors (scheme: TerminalColorScheme|undefined): void { - const config = this.configService.store + const appColorScheme = this.themes._getActiveColorScheme() as TerminalColorScheme - scheme = scheme ?? this.themes._getActiveColorScheme() + scheme = scheme ?? appColorScheme const theme: ITheme = { - foreground: scheme!.foreground, - selectionBackground: scheme!.selection ?? '#88888888', - selectionForeground: scheme!.selectionForeground ?? undefined, - background: !this.themes.findCurrentTheme().followsColorScheme && config.terminal.background === 'colorScheme' ? scheme!.background : '#00000000', - cursor: scheme!.cursor, - cursorAccent: scheme!.cursorAccent, + foreground: scheme.foreground, + selectionBackground: scheme.selection ?? '#88888888', + selectionForeground: scheme.selectionForeground ?? undefined, + background: getTerminalBackgroundColor(this.configService, this.themes, scheme) ?? '#00000000', + cursor: scheme.cursor, + cursorAccent: scheme.cursorAccent, } for (let i = 0; i < COLOR_NAMES.length; i++) { - theme[COLOR_NAMES[i]] = scheme!.colors[i] + theme[COLOR_NAMES[i]] = scheme.colors[i] } if (!deepEqual(this.configuredTheme, theme)) { diff --git a/tabby-terminal/src/helpers.ts b/tabby-terminal/src/helpers.ts new file mode 100644 index 00000000..fcee6a7c --- /dev/null +++ b/tabby-terminal/src/helpers.ts @@ -0,0 +1,21 @@ +import { TerminalColorScheme } from './api/interfaces' +import { ConfigService, ThemesService } from 'tabby-core' + +export function getTerminalBackgroundColor ( + config: ConfigService, + themes: ThemesService, + scheme?: TerminalColorScheme, +): string|null { + const appTheme = themes.findCurrentTheme() + const appColorScheme = themes._getActiveColorScheme() as TerminalColorScheme + + // Use non transparent background when: + // - legacy theme and user choses colorScheme based BG + // - or new theme but profile-specific scheme is used + const shouldUseCSBackground = + !appTheme.followsColorScheme && config.store.terminal.background === 'colorScheme' + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + || appTheme.followsColorScheme && scheme?.name !== appColorScheme.name + + return shouldUseCSBackground && scheme ? scheme.background : null +} diff --git a/yarn.lock b/yarn.lock index eaaf5a7b..9e3ec19f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5603,10 +5603,10 @@ lzma-native@^8.0.5, lzma-native@^8.0.6: node-gyp-build "^4.2.1" readable-stream "^3.6.0" -macos-release@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-3.1.0.tgz#6165bb0736ae567ed6649e36ce6a24d87cbb7aca" - integrity sha512-/M/R0gCDgM+Cv1IuBG1XGdfTFnMEG6PZeT+KGWHO/OG+imqmaD9CH5vHBTycEM3+Kc4uG2Il+tFAuUWLqQOeUA== +macos-release@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-3.3.0.tgz#92cb67bc66d67c3fde4a9e14f5f909afa418b072" + integrity sha512-tPJQ1HeyiU2vRruNGhZ+VleWuMQRro8iFtJxYgnS4NQe+EukKF6aGiIT+7flZhISAt2iaXBCfFGvAyif7/f8nQ== magic-string@^0.27.0: version "0.27.0"