aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-12 06:26:25 -0600
committerRobin Jarry <robin@jarry.cc>2024-02-12 13:49:01 +0100
commit2236e8bbeb262e22bb9262390b803108122a7a94 (patch)
treee2b262aaf934436e55880fd683371aba70090847 /main.go
parent99aa51b7348b178984264ed8c940b983c1205cdd (diff)
downloadaerc-2236e8bbeb262e22bb9262390b803108122a7a94.tar.gz
aerc: set title using vaxis
Set the window title using Vaxis at UI initialization. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'main.go')
-rw-r--r--main.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/main.go b/main.go
index fe8a8333..a9a433f1 100644
--- a/main.go
+++ b/main.go
@@ -1,7 +1,6 @@
package main
import (
- "bytes"
"context"
"errors"
"fmt"
@@ -14,8 +13,6 @@ import (
"time"
"git.sr.ht/~rjarry/go-opt"
- "github.com/mattn/go-isatty"
- "github.com/xo/terminfo"
"git.sr.ht/~rjarry/aerc/app"
"git.sr.ht/~rjarry/aerc/commands"
@@ -98,27 +95,6 @@ func buildInfo() string {
return info
}
-func setWindowTitle() {
- log.Tracef("Parsing terminfo")
- ti, err := terminfo.LoadFromEnv()
- if err != nil {
- log.Warnf("Cannot get terminfo: %v", err)
- return
- }
-
- if !ti.Has(terminfo.HasStatusLine) {
- log.Infof("Terminal does not have status line support")
- return
- }
-
- log.Debugf("Setting terminal title")
- buf := new(bytes.Buffer)
- ti.Fprintf(buf, terminfo.ToStatusLine)
- fmt.Fprint(buf, "aerc")
- ti.Fprintf(buf, terminfo.FromStatusLine)
- os.Stderr.Write(buf.Bytes())
-}
-
type Opts struct {
Help bool `opt:"-h" action:"ShowHelp"`
Version bool `opt:"-v" action:"ShowVersion"`
@@ -248,10 +224,6 @@ func main() {
}
}
- if isatty.IsTerminal(os.Stderr.Fd()) {
- setWindowTitle()
- }
-
go func() {
defer log.PanicHandler()
err := hooks.RunHook(&hooks.AercStartup{Version: Version})