From ea8013003b3c9cefecb55f713fc9d03075d6c192 Mon Sep 17 00:00:00 2001 From: Bennett Payoyo <75754746+Yahiro025@users.noreply.github.com> Date: Fri, 11 Sep 2026 12:31:06 -0700 Subject: [PATCH] Flash taskbar/dock icon when the terminal bell rings (#11651) Co-authored-by: Cursor Agent Co-authored-by: Eugene --- app/lib/window.ts | 7 +++++++ tabby-core/src/api/hostWindow.ts | 3 +++ tabby-electron/src/services/hostWindow.service.ts | 4 ++++ tabby-terminal/src/api/baseTerminalTab.component.ts | 3 +++ .../src/components/terminalSettingsTab.component.pug | 9 +++++++++ tabby-terminal/src/config.ts | 1 + 6 files changed, 27 insertions(+) diff --git a/app/lib/window.ts b/app/lib/window.ts index cb2832107..399b434d2 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -374,6 +374,7 @@ export class Window { }) this.window.on('focus', () => { + this.window.flashFrame(false) this.send('host:window-focused') }) @@ -478,6 +479,12 @@ export class Window { this.on('window-set-progress-bar', (_, value) => { this.window?.setProgressBar(value, { mode: value < 0 ? 'none' : 'normal' }) }) + + this.on('window-flash-frame', () => { + if (this.window && !this.window.isFocused()) { + this.window.flashFrame(true) + } + }) } on (event: string, listener: (...args: any[]) => void): void { diff --git a/tabby-core/src/api/hostWindow.ts b/tabby-core/src/api/hostWindow.ts index 06b6d404a..847dabb2c 100644 --- a/tabby-core/src/api/hostWindow.ts +++ b/tabby-core/src/api/hostWindow.ts @@ -33,4 +33,7 @@ export abstract class HostWindowService { // eslint-disable-next-line @typescript-eslint/no-empty-function bringToFront (): void { } + + // eslint-disable-next-line @typescript-eslint/no-empty-function + flashFrame (): void { } } diff --git a/tabby-electron/src/services/hostWindow.service.ts b/tabby-electron/src/services/hostWindow.service.ts index c6372c10a..5cb639312 100644 --- a/tabby-electron/src/services/hostWindow.service.ts +++ b/tabby-electron/src/services/hostWindow.service.ts @@ -127,4 +127,8 @@ export class ElectronHostWindow extends HostWindowService { bringToFront (): void { this.electron.ipcRenderer.send('window-bring-to-front') } + + flashFrame (): void { + this.electron.ipcRenderer.send('window-flash-frame') + } } diff --git a/tabby-terminal/src/api/baseTerminalTab.component.ts b/tabby-terminal/src/api/baseTerminalTab.component.ts index 36d41ce6e..7d3e377de 100644 --- a/tabby-terminal/src/api/baseTerminalTab.component.ts +++ b/tabby-terminal/src/api/baseTerminalTab.component.ts @@ -434,6 +434,9 @@ export class BaseTerminalTabComponent

extends Bas if (this.config.store.terminal.bell === 'audible') { this.bellPlayer.play() } + if (this.config.store.terminal.bellFlashFrame) { + this.hostWindow.flashFrame() + } if (!this.hasFocus) { this.displayActivity() } diff --git a/tabby-terminal/src/components/terminalSettingsTab.component.pug b/tabby-terminal/src/components/terminalSettingsTab.component.pug index 3657b5e96..15cf45049 100644 --- a/tabby-terminal/src/components/terminalSettingsTab.component.pug +++ b/tabby-terminal/src/components/terminalSettingsTab.component.pug @@ -209,6 +209,15 @@ div.mt-4 label.btn.btn-secondary(for='bellAudible') span(translate) Audible + .form-line(*ngIf='hostApp.platform !== Platform.Web') + .header + .title(translate) Flash taskbar + .description(translate) Flash the taskbar or dock icon when the terminal bell rings and the window is not focused + toggle( + [(ngModel)]='config.store.terminal.bellFlashFrame', + (ngModelChange)='config.save()', + ) + .alert.alert-info.d-flex.align-items-center(*ngIf='config.store.terminal.bell != "audible" && (config.store.terminal.profile || "").startsWith("wsl")') .me-auto(translate) WSL terminal bell can only be muted via Volume Mixer button.btn.btn-secondary((click)='openWSLVolumeMixer()', translate) Show Mixer diff --git a/tabby-terminal/src/config.ts b/tabby-terminal/src/config.ts index 42e3f59ac..ea4d9be34 100644 --- a/tabby-terminal/src/config.ts +++ b/tabby-terminal/src/config.ts @@ -23,6 +23,7 @@ export class TerminalConfigProvider extends ConfigProvider { fallbackFont: null, linePadding: 0, bell: 'off', + bellFlashFrame: false, bracketedPaste: true, background: 'theme', ligatures: false,