Adds title change escapes to cui
This commit is contained in:
parent
8fa7c7a635
commit
aeee577e24
|
@ -49,14 +49,17 @@ func Exit(exitCode int, msg string) {
|
||||||
if msg != "" {
|
if msg != "" {
|
||||||
fmt.Print(msg, "\n")
|
fmt.Print(msg, "\n")
|
||||||
}
|
}
|
||||||
|
fmt.Print("\033[23;0t")
|
||||||
os.Exit(exitCode)
|
os.Exit(exitCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// InitTerm sets the terminal modes appropriate for Bombadillo
|
// InitTerm sets the terminal modes appropriate for Bombadillo
|
||||||
func InitTerm() {
|
func InitTerm() {
|
||||||
SetCharMode()
|
SetCharMode()
|
||||||
|
fmt.Print("\033[22;0t")
|
||||||
Tput("rmam") // turn off line wrapping
|
Tput("rmam") // turn off line wrapping
|
||||||
Tput("smcup") // use alternate screen
|
Tput("smcup") // use alternate screen
|
||||||
|
fmt.Print("\033]0;Bombadillo\007")
|
||||||
}
|
}
|
||||||
|
|
||||||
// CleanupTerm reverts changs to terminal mode made by InitTerm
|
// CleanupTerm reverts changs to terminal mode made by InitTerm
|
||||||
|
|
Loading…
Reference in New Issue