blob: a39e386f26d55881431a7ba5975b08d354446892 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package main
import (
"fmt"
)
// setTitle prints the escape sequence to change the terminal title.
func setTerminalTitle(title string) {
fmt.Printf("\033]2;%s\007", title)
}
// resetTitle prints the escape sequence to clear the title.
// Most terminals will revert to their default profile title.
func resetTerminalTitle() {
fmt.Printf("\033]2;\007")
}
|