mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
This commit is contained in:
parent
e206bcb922
commit
f8ee0378c0
|
@ -280,6 +280,7 @@ export class Sound {
|
|||
|
||||
public static readonly error = Sound.register({ fileName: 'error.mp3' });
|
||||
public static readonly warning = Sound.register({ fileName: 'warning.mp3' });
|
||||
public static readonly success = Sound.register({ fileName: 'success.mp3' });
|
||||
public static readonly foldedArea = Sound.register({ fileName: 'foldedAreas.mp3' });
|
||||
public static readonly break = Sound.register({ fileName: 'break.mp3' });
|
||||
public static readonly quickFixes = Sound.register({ fileName: 'quickFixes.mp3' });
|
||||
|
@ -468,6 +469,13 @@ export class AccessibilitySignal {
|
|||
settingsKey: 'accessibility.signals.terminalCommandFailed',
|
||||
});
|
||||
|
||||
public static readonly terminalCommandSucceeded = AccessibilitySignal.register({
|
||||
name: localize('accessibilitySignals.terminalCommandSucceeded', 'Terminal Command Succeeded'),
|
||||
sound: Sound.success,
|
||||
announcementMessage: localize('accessibility.signals.terminalCommandSucceeded', 'Command Succeeded'),
|
||||
settingsKey: 'accessibility.signals.terminalCommandSucceeded',
|
||||
});
|
||||
|
||||
public static readonly terminalBell = AccessibilitySignal.register({
|
||||
name: localize('accessibilitySignals.terminalBell', 'Terminal Bell'),
|
||||
sound: Sound.terminalBell,
|
||||
|
|
|
@ -364,6 +364,20 @@ const configuration: IConfigurationNode = {
|
|||
},
|
||||
}
|
||||
},
|
||||
'accessibility.signals.terminalCommandSucceeded': {
|
||||
...signalFeatureBase,
|
||||
'description': localize('accessibility.signals.terminalCommandSucceeded', "Plays a signal - sound (audio cue) and/or announcement (alert) - when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."),
|
||||
'properties': {
|
||||
'sound': {
|
||||
'description': localize('accessibility.signals.terminalCommandSucceeded.sound', "Plays a sound when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."),
|
||||
...soundFeatureBase
|
||||
},
|
||||
'announcement': {
|
||||
'description': localize('accessibility.signals.terminalCommandSucceeded.announcement', "Announces when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."),
|
||||
...announcementFeatureBase
|
||||
},
|
||||
}
|
||||
},
|
||||
'accessibility.signals.terminalQuickFix': {
|
||||
...signalFeatureBase,
|
||||
'description': localize('accessibility.signals.terminalQuickFix', "Plays a signal - sound (audio cue) and/or announcement (alert) - when terminal Quick Fixes are available."),
|
||||
|
|
|
@ -230,6 +230,8 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
|
|||
this.registerCommandDecoration(command);
|
||||
if (command.exitCode) {
|
||||
this._accessibilitySignalService.playSignal(AccessibilitySignal.terminalCommandFailed);
|
||||
} else {
|
||||
this._accessibilitySignalService.playSignal(AccessibilitySignal.terminalCommandSucceeded);
|
||||
}
|
||||
}));
|
||||
// Command invalidated
|
||||
|
|
|
@ -193,6 +193,8 @@ export class TerminalAccessibleViewContribution extends Disposable implements IT
|
|||
}
|
||||
if (command.exitCode) {
|
||||
this._accessibilitySignalService.playSignal(AccessibilitySignal.terminalCommandFailed);
|
||||
} else {
|
||||
this._accessibilitySignalService.playSignal(AccessibilitySignal.terminalCommandSucceeded);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue