From a0e3b0b03312ffcb72ff6c461bbd608e537ae2a5 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sat, 13 Oct 2018 14:14:39 +0200 Subject: [PATCH] tell the user how to mute the WSL bell (fixes #413) --- .../components/terminalSettingsTab.component.pug | 6 +++++- .../components/terminalSettingsTab.component.ts | 14 +++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/terminus-terminal/src/components/terminalSettingsTab.component.pug b/terminus-terminal/src/components/terminalSettingsTab.component.pug index 6b61ddc2..2cd44805 100644 --- a/terminus-terminal/src/components/terminalSettingsTab.component.pug +++ b/terminus-terminal/src/components/terminalSettingsTab.component.pug @@ -29,7 +29,11 @@ h3.mt-3.mb-3 Terminal [value]='"audible"' ) | Audible - + +.alert.alert-info.d-flex.align-items-center(*ngIf='config.store.terminal.bell != "audible" && config.store.terminal.shell.startsWith("wsl")') + .mr-auto WSL terminal bell can only be muted via Volume Mixer + button.btn.btn-secondary((click)='openWSLVolumeMixer()') Show Mixer + .form-line .header .title Right click diff --git a/terminus-terminal/src/components/terminalSettingsTab.component.ts b/terminus-terminal/src/components/terminalSettingsTab.component.ts index ef95b942..70272ffe 100644 --- a/terminus-terminal/src/components/terminalSettingsTab.component.ts +++ b/terminus-terminal/src/components/terminalSettingsTab.component.ts @@ -1,5 +1,6 @@ import { Component } from '@angular/core' -import { ConfigService } from 'terminus-core' +import { ConfigService, ElectronService } from 'terminus-core' +import { TerminalService } from '../services/terminal.service' @Component({ template: require('./terminalSettingsTab.component.pug'), @@ -7,5 +8,16 @@ import { ConfigService } from 'terminus-core' export class TerminalSettingsTabComponent { constructor ( public config: ConfigService, + private electron: ElectronService, + private terminal: TerminalService, ) { } + + openWSLVolumeMixer () { + this.electron.shell.openItem('sndvol.exe') + this.terminal.openTab({ + id: '', + command: 'wsl.exe', + args: ['tput', 'bel'], + }, null, true) + } } -- GitLab