Adds title change escapes to cui

pull/121/head
sloumdrone 3 years ago
parent 8fa7c7a635
commit aeee577e24
  1. 3
      cui/cui.go

@ -49,14 +49,17 @@ func Exit(exitCode int, msg string) {
if msg != "" {
fmt.Print(msg, "\n")
}
fmt.Print("\033[23;0t")
os.Exit(exitCode)
}
// InitTerm sets the terminal modes appropriate for Bombadillo
func InitTerm() {
SetCharMode()
fmt.Print("\033[22;0t")
Tput("rmam") // turn off line wrapping
Tput("smcup") // use alternate screen
fmt.Print("\033]0;Bombadillo\007")
}
// CleanupTerm reverts changs to terminal mode made by InitTerm

Loading…
Cancel
Save