helpers

package
v0.0.0-...-56f1d57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecString

func ExecString() string

ExecString is primarily used for popups which by default start in the users home directory.

This method is used to run popupe in the current terminal directory

func ExecutableName

func ExecutableName() string

ExecutableName gets the name of the current running program

func NewErrorCmd

func NewErrorCmd(err error) tea.Cmd

NewErrorCmd is returned by components that are in error

func OverlayCmd

func OverlayCmd(message any) tea.Cmd

OverlayCmd is the tea command being returned from an overlay

func ReloadManagerCmd

func ReloadManagerCmd() tea.Cmd

ReloadManagerCmd is the tea command to trigger a ReloadManagerMsg

func ReloadWindowsCmd

func ReloadWindowsCmd() tea.Cmd

ReloadWindowsCmd triggers the sending of a ReloadWindowsMsg

func SaveSessionsCmd

func SaveSessionsCmd() tea.Cmd

SaveSessionsCmd sends the message that sessions should be saved to config

Types

type ErrorMsg

type ErrorMsg struct {
	Error error
}

ErrorMsg is a tea message used to instruct the program it is in an error state

type OverlayMsg

type OverlayMsg struct {
	Message any
}

OverlayMsg is a tea message that contains information from an overlay window

type Pane

type Pane struct {
	CurrentCommand string `yaml:"pane_current_command"`
	CurrentPath    string `yaml:"pane_current_path"`
	StartCommand   string `yaml:"pane_start_command"`
	StartPath      string `yaml:"pane_start_path"`
	Title          string `yaml:"title"`
}

Pane is a light wrapper for a pane within a window

type ReloadManagerMsg

type ReloadManagerMsg struct{}

ReloadManagerMsg instructs the session manager that it needs to reload components

type ReloadWindowsMsg

type ReloadWindowsMsg struct{}

ReloadWindowsMsg triggers the relaoding of session windows

type SaveMsg

type SaveMsg struct{}

SaveMsg triggers the saving of session state

type Session

type Session struct {
	Command string   `yaml:"command"`
	Name    string   `yaml:"name"`
	Path    string   `yaml:"path"`
	Windows []Window `yaml:"windows"`
}

Session is a light wrapper for a tmux session

type UseOverlay

type UseOverlay interface {
	Overlay() UseOverlay
	Update(tea.Msg) (tea.Model, tea.Cmd)
	GetSize() (int, int)
}

UseOverlay is the interface used to instruct the main window that the current component can use the overlay subsystem

type Window

type Window struct {
	Layout string `yaml:"layout"`
	Name   string `yaml:"name"`
	Index  uint   `yaml:"index"`
	Panes  []Pane `yaml:"panes"`
}

Window is a light wrapper for a tmux window

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL