Skip to content

Commit

Permalink
fix #47711
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge committed Sep 13, 2022
1 parent 4ddfd3b commit d9b01d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/vs/workbench/contrib/audioCues/browser/audioCueService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export class Sound {
public static readonly break = Sound.register({ fileName: 'break.mp3' });
public static readonly quickFixes = Sound.register({ fileName: 'quickFixes.mp3' });
public static readonly taskEnded = Sound.register({ fileName: 'taskEnded.mp3' });
public static readonly terminalBell = Sound.register({ fileName: 'terminalBell.mp3' });

private constructor(public readonly fileName: string) { }
}
Expand Down Expand Up @@ -218,6 +219,12 @@ export class AudioCue {
settingsKey: 'audioCues.taskEnded'
});

public static readonly terminalBell = AudioCue.register({
name: localize('audioCues.terminalBell', 'Terminal Bell'),
sound: Sound.terminalBell,
settingsKey: 'audioCues.terminalBell'
});

private constructor(
public readonly sound: Sound,
public readonly name: string,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import { IColorTheme, ICssStyleCollector, IThemeService, registerThemingParticip
import { IWorkspaceContextService, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { IWorkspaceTrustRequestService } from 'vs/platform/workspace/common/workspaceTrust';
import { IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
import { AudioCue, IAudioCueService } from 'vs/workbench/contrib/audioCues/browser/audioCueService';
import { TaskSettingId } from 'vs/workbench/contrib/tasks/common/tasks';
import { IDetectedLinks, TerminalLinkManager } from 'vs/workbench/contrib/terminal/browser/links/terminalLinkManager';
import { TerminalLinkQuickpick } from 'vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick';
Expand Down Expand Up @@ -376,7 +377,8 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
@IHistoryService private readonly _historyService: IHistoryService,
@ITelemetryService private readonly _telemetryService: ITelemetryService,
@IOpenerService private readonly _openerService: IOpenerService,
@ICommandService private readonly _commandService: ICommandService
@ICommandService private readonly _commandService: ICommandService,
@IAudioCueService private readonly _audioCueService: IAudioCueService
) {
super();

Expand Down Expand Up @@ -730,6 +732,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
icon: Codicon.bell,
tooltip: nls.localize('bellStatus', "Bell")
}, this._configHelper.config.bellDuration);
this._audioCueService.playSound(AudioCue.terminalBell.sound);
}
});
}, 1000);
Expand Down

0 comments on commit d9b01d4

Please sign in to comment.