Skip to main content
ansicode

DECSWBV / DECSMBV — Set warning / margin bell volume (CSI Ps SP t / CSI Ps SP u)

Adjust the audio volume of the C0 BEL (DECSWBV) and the right-margin warning bell (DECSMBV) — almost universally ignored by modern emulators.

Byte forms

Every common string-literal form so you can paste-and-search either direction.

\\x1b[\x1b[<Ps> t (DECSWBV) \x1b[<Ps> u (DECSMBV)
\\033[\033[8 t / \033[4 u
\\e[\e[8 t / \e[4 u
ESC [ESC [ Ps SP t / ESC [ Ps SP u
hex1b 5b ... 20 74 / 1b 5b ... 20 75

Description

Two DEC VT520 audio controls that share the same `Ps` scale: `0` or `1` silence the bell, `2` / `3` / `4` set low volume, and `5` / `6` / `7` / `8` set high volume. **DECSWBV** (`\x1b[<Ps> t`, intermediate is a literal space `0x20`) controls the volume of the C0 BEL byte (`\x07`, Ctrl-G) that processes emit on shell-completion / error / Ctrl+G. **DECSMBV** (`\x1b[<Ps> u`) controls the separate margin-bell that DEC terminals could fire when text written past column N approached the right margin (column N defaulting to 72 of 80, configurable via DECSMM). The intermediate space matters — without it `\x1b[8t` is XTWINOPS resize and `\x1b[8u` is undefined. Modern emulators (xterm, kitty, wezterm, ghostty, alacritty, iTerm2, Windows Terminal) all delegate bell rendering to OS audio settings or a single boolean enable / disable, so DECSWBV / DECSMBV are silently ignored. The sequences remain meaningful only on physical DEC VTxxx terminals and a handful of emulators that ship VT compatibility modes (mlterm, some BBS clients). Document them for parser completeness, but don't expect actual volume control.

Spec citation: DEC VT520 RM (DECSWBV / DECSMBV)

Parameters

PsVolume level. `0`/`1` off · `2`–`4` low · `5`–`8` high. Default 0.

Examples

bash
printf '\033[8 t'   # DECSWBV: warning bell at max volume (note SP before t)
python
import sys; sys.stdout.write('\x1b[0 t')   # DECSWBV: silence the warning bell
go
fmt.Print("\x1b[4 u")   // DECSMBV: low-volume margin bell
javascript
process.stdout.write('\x1b[0 u')   // DECSMBV: silence the margin bell
c
printf("\x1b[6 t");  /* DECSWBV: medium-high bell — ignored on most emulators */

Terminal support

xterm
no
Linux console (fbcon)
no
macOS Terminal.app
no
iTerm2
no
Windows Terminal
no
cmd.exe / ConPTY
no
kitty
no
alacritty
no
WezTerm
no
Ghostty
no
GNOME Terminal
no
Konsole
no
tmux
no
GNU screen
no

Related sequences