mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
website: BEL
This commit is contained in:
26
website/app/vt/bel/page.mdx
Normal file
26
website/app/vt/bel/page.mdx
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import VTSequence from "@/components/VTSequence";
|
||||||
|
|
||||||
|
# Bell (BEL)
|
||||||
|
|
||||||
|
<VTSequence sequence="BEL" />
|
||||||
|
|
||||||
|
The purpose of the bell sequence is to raise the attention
|
||||||
|
of the user. Historically, this would [ring a physical bell](https://en.wikipedia.org/wiki/Bell_character). Today, many alternate behaviors are
|
||||||
|
acceptable:
|
||||||
|
|
||||||
|
- An audible sound can be played through the speakers
|
||||||
|
- Background or border of a window can visually flash
|
||||||
|
- The terminal window can come into focus or be put on top
|
||||||
|
- Application icon can bounce or otherwise draw attention
|
||||||
|
- A desktop notification can be shown
|
||||||
|
|
||||||
|
Normally, the bell behavior is configurable and can be disabled.
|
||||||
|
|
||||||
|
## BEL as an OSC Terminator
|
||||||
|
|
||||||
|
The `BEL` character is also a valid terminating character for
|
||||||
|
OSC sequences, although `ST` is preferred. If `BEL` is the
|
||||||
|
terminating character for an OSC sequence, any responses should
|
||||||
|
also terminate with the `BEL` character.[^1]
|
||||||
|
|
||||||
|
[^1]: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
|
@ -1,8 +1,12 @@
|
|||||||
|
// Draw a diagram showing the VT sequence.
|
||||||
export default function VTSequence({ sequence }: { sequence: string }) {
|
export default function VTSequence({ sequence }: { sequence: string }) {
|
||||||
|
const specialChar = special[sequence] ?? 0;
|
||||||
|
const hex = specialChar.toString(16).padStart(2, "0");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex my-2.5">
|
<div className="flex my-2.5">
|
||||||
<div className="border shrink px-1 grid grid-rows-2 grid-cols-1 text-center">
|
<div className="border shrink px-1 grid grid-rows-2 grid-cols-1 text-center">
|
||||||
<div>0x08</div>
|
<div>0x{hex}</div>
|
||||||
<div>{sequence}</div>
|
<div>{sequence}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -10,5 +14,6 @@ export default function VTSequence({ sequence }: { sequence: string }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const special = {
|
const special = {
|
||||||
|
BEL: 0x07,
|
||||||
BS: 0x08,
|
BS: 0x08,
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,6 @@ const withMDX = createMDX({
|
|||||||
// Add markdown plugins here, as desired
|
// Add markdown plugins here, as desired
|
||||||
options: {
|
options: {
|
||||||
remarkPlugins: [remarkGfm, remarkToc],
|
remarkPlugins: [remarkGfm, remarkToc],
|
||||||
|
|
||||||
rehypePlugins: [rehypeSlug, [rehypePrettyCode, prettyCodeOptions]],
|
rehypePlugins: [rehypeSlug, [rehypePrettyCode, prettyCodeOptions]],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
4628
website/package-lock.json
generated
4628
website/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@
|
|||||||
"react-dom": "^18",
|
"react-dom": "^18",
|
||||||
"rehype-pretty-code": "^0.10.1",
|
"rehype-pretty-code": "^0.10.1",
|
||||||
"rehype-slug": "^6.0.0",
|
"rehype-slug": "^6.0.0",
|
||||||
"remark-gfm": "^4.0.0",
|
"remark-gfm": "^3.0.1",
|
||||||
"remark-toc": "^9.0.0",
|
"remark-toc": "^9.0.0",
|
||||||
"shiki": "^0.14.4"
|
"shiki": "^0.14.4"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user