From 0648e7a761fa7f48c159f1bf6e2000b5d54d91ba Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:23:15 +0200 Subject: [PATCH] app msgs Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- app/app.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 app/app.go diff --git a/app/app.go b/app/app.go new file mode 100644 index 0000000..9c9adde --- /dev/null +++ b/app/app.go @@ -0,0 +1,33 @@ +package app + +import tea "charm.land/bubbletea/v2" + +type QuitMsg struct{} + +func Quit() tea.Cmd { + return func() tea.Msg { return QuitMsg{} } +} + +type FocusMsg struct{} + +func Focus() tea.Cmd { + return func() tea.Msg { return FocusMsg{} } +} + +type BlurMsg struct{} + +func Blur() tea.Cmd { + return func() tea.Msg { return BlurMsg{} } +} + +type RequestFocusMsg struct{} + +func RequestFocus() tea.Cmd { + return func() tea.Msg { return RequestFocusMsg{} } +} + +type SetTitleMsg struct{ Title string } + +func SetTitle(title string) tea.Cmd { + return func() tea.Msg { return SetTitleMsg{Title: title} } +}