From 374bd4c0e16620b75318b4a9a132dd05d24df936 Mon Sep 17 00:00:00 2001 From: eeeXun Date: Sat, 22 Oct 2022 23:34:30 +0800 Subject: [PATCH] SetTermTitle --- main.go | 3 +-- utils.go | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b41900d..958f4ee 100644 --- a/main.go +++ b/main.go @@ -25,8 +25,7 @@ var ( ) func main() { - // result, _ := translator.Translate("Hello world\nApple\nbumper") - // fmt.Println(result) + SetTermTitle("GTT") configInit() window.colorInit() uiInit() diff --git a/utils.go b/utils.go index 1f10292..46ae5a1 100644 --- a/utils.go +++ b/utils.go @@ -8,3 +8,7 @@ func IndexOf(candidate string, arr []string) int { } return -1 } + +func SetTermTitle(title string) { + print("\033]0;" , title , "\007") +}