diff --git a/cmd/root.go b/cmd/root.go index 0eec0b1..4a7d786 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -6,7 +6,6 @@ import ( "log/slog" "github.com/ayn2op/discordo/internal/config" - "github.com/ayn2op/discordo/internal/consts" "github.com/ayn2op/discordo/internal/logger" "github.com/ayn2op/discordo/internal/ui/root" "github.com/ayn2op/tview" @@ -60,8 +59,6 @@ func Run() error { if cfg.Mouse { screen.EnableMouse() } - - screen.SetTitle(consts.Name) screen.EnablePaste() screen.EnableFocus() diff --git a/internal/ui/root/view.go b/internal/ui/root/view.go index 9a79297..9cbf462 100644 --- a/internal/ui/root/view.go +++ b/internal/ui/root/view.go @@ -6,6 +6,7 @@ import ( "github.com/ayn2op/discordo/internal/clipboard" "github.com/ayn2op/discordo/internal/config" + "github.com/ayn2op/discordo/internal/consts" "github.com/ayn2op/discordo/internal/keyring" "github.com/ayn2op/discordo/internal/ui/chat" "github.com/ayn2op/discordo/internal/ui/login" @@ -93,7 +94,7 @@ func (v *View) HandleEvent(event tcell.Event) tview.Command { return tview.QuitCommand{} } } - return tview.SetFocusCommand{Target: v.inner} + return tview.BatchCommand{tview.SetTitleCommand(consts.Name), tview.SetFocusCommand{Target: v.inner}} case *tview.KeyEvent: switch {