app

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package app is goful application components.

Package app provides stub implementations for platforms where nsync is not available. [IMPL:NSYNC_OBSERVER] [IMPL:NSYNC_COPY_MOVE] [ARCH:NSYNC_INTEGRATION] [REQ:NSYNC_MULTI_TARGET]

Package app provides synchronized command operations across all panes. [IMPL:SYNC_EXECUTE] [ARCH:SYNC_MODE] [REQ:SYNC_COMMANDS]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseStartupDirs

func ParseStartupDirs(args []string) ([]string, []string)

ParseStartupDirs normalizes positional CLI arguments into absolute directory paths while collecting warnings. [IMPL:WORKSPACE_START_DIRS] [ARCH:WORKSPACE_BOOTSTRAP] [REQ:WORKSPACE_START_DIRS]

func SeedStartupWorkspaces

func SeedStartupWorkspaces(g *Goful, dirs []string, debug bool) bool

SeedStartupWorkspaces resizes the active workspace's directory windows so each entry maps to a positional CLI argument. Returns true when seeding occurs so callers can detect fallback scenarios. [IMPL:WORKSPACE_START_DIRS] [ARCH:WORKSPACE_BOOTSTRAP] [REQ:WORKSPACE_START_DIRS]

Types

type Goful

type Goful struct {
	*filer.Filer
	// contains filtered or unexported fields
}

Goful represents a main application.

func NewGoful

func NewGoful(path string) *Goful

NewGoful creates a new goful client based recording a previous state.

func (*Goful) BulkRename

func (g *Goful) BulkRename()

BulkRename starts the bulk rename mode.

func (*Goful) ChangeWorkspaceTitle

func (g *Goful) ChangeWorkspaceTitle()

ChangeWorkspaceTitle starts the changing workspace title.

func (*Goful) Chdir

func (g *Goful) Chdir()

Chdir starts the change directory mode.

func (*Goful) Chmod

func (g *Goful) Chmod()

Chmod starts the change mode mode.

func (*Goful) ConfigFiler

func (g *Goful) ConfigFiler(f func(*Goful) widget.Keymap)

ConfigFiler sets a keymap function for the filer.

func (*Goful) ConfigShell

func (g *Goful) ConfigShell(config func(cmd string) []string)

ConfigShell sets a function that returns a shell name and options.

func (*Goful) ConfigTerminal

func (g *Goful) ConfigTerminal(config func(cmd string) []string)

ConfigTerminal sets a function that returns a terminal name and options.

func (*Goful) ContinueDiffSearch

func (g *Goful) ContinueDiffSearch()

ContinueDiffSearch continues the difference search from the current cursor position. Skips the file at cursor and finds the next difference. [IMPL:DIFF_SEARCH] [ARCH:DIFF_SEARCH] [REQ:DIFF_SEARCH]

func (*Goful) Copy

func (g *Goful) Copy()

Copy starts the copy mode.

func (*Goful) CopyAll

func (g *Goful) CopyAll()

CopyAll displays a message that nsync is not available on this platform. [IMPL:NSYNC_COPY_MOVE] [ARCH:NSYNC_INTEGRATION] [REQ:NSYNC_MULTI_TARGET]

func (*Goful) DiffSearchStatus

func (g *Goful) DiffSearchStatus() string

DiffSearchStatus returns the current diff search status text for the header. [IMPL:DIFF_SEARCH] [ARCH:DIFF_SEARCH] [REQ:DIFF_SEARCH]

func (*Goful) Disconnect

func (g *Goful) Disconnect()

Disconnect references to a next widget for exiting.

func (*Goful) Draw

func (g *Goful) Draw()

Draw all widgets.

func (*Goful) Glob

func (g *Goful) Glob()

Glob starts the glob mode.

func (*Goful) Globdir

func (g *Goful) Globdir()

Globdir starts the globdir mode.

func (*Goful) HandleParentButtonPress

func (g *Goful) HandleParentButtonPress()

HandleParentButtonPress navigates to the parent directory, respecting Linked mode. When Linked mode is ON, navigates all windows to their respective parent directories. [IMPL:TOOLBAR_PARENT_BUTTON] [ARCH:TOOLBAR_LAYOUT] [REQ:TOOLBAR_PARENT_BUTTON]

func (*Goful) Help

func (g *Goful) Help()

Help opens the Help popup displaying the keystroke catalog. [IMPL:HELP_POPUP] [ARCH:HELP_WIDGET] [REQ:HELP_POPUP]

func (*Goful) Input

func (g *Goful) Input(key string)

Input to a current widget.

func (*Goful) IsDiffSearchActive

func (g *Goful) IsDiffSearchActive() bool

IsDiffSearchActive returns true if a difference search is currently active. [IMPL:DIFF_SEARCH] [ARCH:DIFF_SEARCH] [REQ:DIFF_SEARCH]

func (*Goful) IsLinkedNav

func (g *Goful) IsLinkedNav() bool

IsLinkedNav returns true if linked navigation mode is enabled. [IMPL:LINKED_NAVIGATION] [ARCH:LINKED_NAVIGATION] [REQ:LINKED_NAVIGATION]

func (*Goful) IsSyncIgnoreFailures

func (g *Goful) IsSyncIgnoreFailures() bool

IsSyncIgnoreFailures returns true if ignore-failures mode is enabled for sync operations. [IMPL:TOOLBAR_IGNORE_FAILURES] [ARCH:TOOLBAR_LAYOUT] [REQ:TOOLBAR_SYNC_BUTTONS]

func (*Goful) Menu

func (g *Goful) Menu(name string)

Menu runs a menu mode.

func (*Goful) Mkdir

func (g *Goful) Mkdir()

Mkdir starts the make directory mode.

func (*Goful) Move

func (g *Goful) Move()

Move starts the move mode.

func (*Goful) MoveAll

func (g *Goful) MoveAll()

MoveAll displays a message that nsync is not available on this platform. [IMPL:NSYNC_COPY_MOVE] [ARCH:NSYNC_INTEGRATION] [REQ:NSYNC_MULTI_TARGET]

func (*Goful) MoveBottomLinked

func (g *Goful) MoveBottomLinked()

MoveBottomLinked moves cursor to bottom and syncs to other windows if linked mode is ON. [IMPL:LINKED_CURSOR_SYNC] [ARCH:LINKED_NAVIGATION] [REQ:LINKED_NAVIGATION]

func (*Goful) MoveCursorLinked

func (g *Goful) MoveCursorLinked(amount int)

MoveCursorLinked moves cursor and syncs to other windows if linked mode is ON. [IMPL:LINKED_CURSOR_SYNC] [ARCH:LINKED_NAVIGATION] [REQ:LINKED_NAVIGATION]

func (*Goful) MoveTopLinked

func (g *Goful) MoveTopLinked()

MoveTopLinked moves cursor to top and syncs to other windows if linked mode is ON. [IMPL:LINKED_CURSOR_SYNC] [ARCH:LINKED_NAVIGATION] [REQ:LINKED_NAVIGATION]

func (*Goful) Next

func (g *Goful) Next() widget.Widget

Next returns a next widget for drawing and input.

func (*Goful) PageDownLinked

func (g *Goful) PageDownLinked()

PageDownLinked moves cursor down a page and syncs to other windows if linked mode is ON. [IMPL:LINKED_CURSOR_SYNC] [ARCH:LINKED_NAVIGATION] [REQ:LINKED_NAVIGATION]

func (*Goful) PageUpLinked

func (g *Goful) PageUpLinked()

PageUpLinked moves cursor up a page and syncs to other windows if linked mode is ON. [IMPL:LINKED_CURSOR_SYNC] [ARCH:LINKED_NAVIGATION] [REQ:LINKED_NAVIGATION]

func (*Goful) Quit

func (g *Goful) Quit()

Quit starts the quit mode.

func (*Goful) Remove

func (g *Goful) Remove()

Remove starts the remove mode.

func (*Goful) Rename

func (g *Goful) Rename()

Rename starts the rename mode.

func (*Goful) Resize

func (g *Goful) Resize(x, y, width, height int)

Resize all widgets.

func (*Goful) Run

func (g *Goful) Run()

Run the goful client. [IMPL:EVENT_LOOP_SHUTDOWN] [ARCH:EVENT_LOOP_SHUTDOWN] [REQ:EVENT_LOOP_SHUTDOWN]

func (*Goful) SetBorderStyle

func (g *Goful) SetBorderStyle(style widget.BorderStyle)

SetBorderStyle sets the filer border style.

func (*Goful) SetLinkedNav

func (g *Goful) SetLinkedNav(enabled bool)

SetLinkedNav sets the linked navigation mode state. [IMPL:LINKED_NAVIGATION_AUTO_DISABLE] [ARCH:LINKED_NAVIGATION] [REQ:LINKED_NAVIGATION]

func (*Goful) Shell

func (g *Goful) Shell(cmd string, offset ...int)

Shell starts the shell mode. The head of variadic arguments is used for cursor positioning.

func (*Goful) ShellSuspend

func (g *Goful) ShellSuspend(cmd string, offset ...int)

ShellSuspend starts the shell mode and suspends screen after running. The head of variadic arguments is used for cursor positioning.

func (*Goful) Spawn

func (g *Goful) Spawn(cmd string)

Spawn a process by the shell or the terminal.

func (*Goful) SpawnSuspend

func (g *Goful) SpawnSuspend(cmd string)

SpawnSuspend spawns a process and suspends screen.

func (*Goful) StartDiffSearch

func (g *Goful) StartDiffSearch()

StartDiffSearch begins a new difference search across all windows. Records initial directories and finds the first difference. [IMPL:DIFF_SEARCH] [ARCH:DIFF_SEARCH] [REQ:DIFF_SEARCH]

func (*Goful) StartSyncCopy

func (g *Goful) StartSyncCopy(filename string, ignoreFailures bool)

StartSyncCopy initiates the sync copy operation. [IMPL:SYNC_EXECUTE] [ARCH:SYNC_MODE] [REQ:SYNC_COMMANDS] [IMPL:TOOLBAR_SYNC_COPY] [REQ:TOOLBAR_SYNC_BUTTONS]

func (*Goful) StartSyncDelete

func (g *Goful) StartSyncDelete(filename string, ignoreFailures bool)

StartSyncDelete initiates the sync delete operation. [IMPL:SYNC_EXECUTE] [ARCH:SYNC_MODE] [REQ:SYNC_COMMANDS] [IMPL:TOOLBAR_SYNC_DELETE] [REQ:TOOLBAR_SYNC_BUTTONS]

func (*Goful) StartSyncRename

func (g *Goful) StartSyncRename(filename string, ignoreFailures bool)

StartSyncRename initiates the sync rename operation. [IMPL:SYNC_EXECUTE] [ARCH:SYNC_MODE] [REQ:SYNC_COMMANDS] [IMPL:TOOLBAR_SYNC_RENAME] [REQ:TOOLBAR_SYNC_BUTTONS]

func (*Goful) SyncMode

func (g *Goful) SyncMode(ignoreFailures bool)

SyncMode starts the sync command mode for synchronized operations across all panes. If ignoreFailures is true, operations continue even if some panes fail. [IMPL:SYNC_EXECUTE] [ARCH:SYNC_MODE] [REQ:SYNC_COMMANDS]

func (*Goful) ToggleLinkedNav

func (g *Goful) ToggleLinkedNav() bool

ToggleLinkedNav toggles the linked navigation mode and returns the new state. [IMPL:LINKED_NAVIGATION] [ARCH:LINKED_NAVIGATION] [REQ:LINKED_NAVIGATION]

func (*Goful) ToggleSyncIgnoreFailures

func (g *Goful) ToggleSyncIgnoreFailures() bool

ToggleSyncIgnoreFailures toggles the ignore-failures mode and returns the new state. [IMPL:TOOLBAR_IGNORE_FAILURES] [ARCH:TOOLBAR_LAYOUT] [REQ:TOOLBAR_SYNC_BUTTONS]

func (*Goful) Touch

func (g *Goful) Touch()

Touch starts the touch file mode.

type SyncFailure

type SyncFailure struct {
	PaneIndex int
	Error     error
}

SyncFailure records a failure in a specific pane. [IMPL:SYNC_EXECUTE] [ARCH:SYNC_MODE] [REQ:SYNC_COMMANDS]

type SyncResult

type SyncResult struct {
	Succeeded int
	Skipped   int
	Failures  []SyncFailure
}

SyncResult holds the result of a sync operation. [IMPL:SYNC_EXECUTE] [ARCH:SYNC_MODE] [REQ:SYNC_COMMANDS]

Jump to

Keyboard shortcuts

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