Documentation
¶
Index ¶
- func Execute(argv0 string, argv, envv []string) error
- type CollapsedPath
- type DeleteAction
- type Option
- type ProgressBar
- type ResultRow
- type UI
- func (ui *UI) AnalyzePath(path string, parentDir fs.Item) error
- func (ui *UI) ListDevices(getter device.DevicesInfoGetter) error
- func (ui *UI) ReadAnalysis(input io.Reader) error
- func (ui *UI) ReadFromStorage(storagePath, path string) error
- func (ui *UI) SetBrowseParentDirs()
- func (ui *UI) SetChangeCwdFn(fn func(string) error)
- func (ui *UI) SetCollapsePath(value bool)
- func (ui *UI) SetConfirmQuit(value bool)
- func (ui *UI) SetCurrentItemNameMaxLen(maxLen int)
- func (ui *UI) SetDefaultSorting(by, order string)
- func (ui *UI) SetDeleteInBackground()
- func (ui *UI) SetDeleteInParallel()
- func (ui *UI) SetFooterBackgroundColor(color string)
- func (ui *UI) SetFooterNumberColor(color string)
- func (ui *UI) SetFooterTextColor(color string)
- func (ui *UI) SetHeaderBackgroundColor(color string)
- func (ui *UI) SetHeaderHidden()
- func (ui *UI) SetHeaderTextColor(color string)
- func (ui *UI) SetMarkedBackgroundColor(color tcell.Color)
- func (ui *UI) SetMarkedTextColor(color tcell.Color)
- func (ui *UI) SetNoDelete()
- func (ui *UI) SetNoDeleteWithFilter()
- func (ui *UI) SetNoSpawnShell()
- func (ui *UI) SetNoViewFile()
- func (ui *UI) SetResultRowDirectoryColor(color string)
- func (ui *UI) SetResultRowNumberColor(color string)
- func (ui *UI) SetSelectedBackgroundColor(color tcell.Color)
- func (ui *UI) SetSelectedTextColor(color tcell.Color)
- func (ui *UI) SetShowBarPercentage()
- func (ui *UI) SetShowDiskProgressBar(value bool)
- func (ui *UI) SetShowItemCount()
- func (ui *UI) SetShowMTime()
- func (ui *UI) SetShowSymlinkTarget(value bool)
- func (ui *UI) SetTimeFilterWithInfo(tf *timefilter.TimeFilter, loc *time.Location)
- func (ui *UI) StartUILoop() error
- func (ui *UI) UseOldSizeBar()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CollapsedPath ¶
type CollapsedPath struct {
DisplayName string // The display name shown in the UI (e.g., "a/b/c")
DeepestDir fs.Item // The actual deepest directory item
Segments []string // Individual path segments of the collapsed chain
}
CollapsedPath represents a directory chain that can be collapsed into a single display entry. For example, if directory "a" contains only directory "b", and "b" contains only "c", this represents the collapsed path "a/b/c" that allows direct navigation to the deepest directory.
type DeleteAction ¶ added in v0.3.0
type DeleteAction uint8
DeleteAction selects how an item is removed from the directory tree.
const ( ActionDelete DeleteAction = iota ActionEmpty ActionMoveToTrash )
func (DeleteAction) Acting ¶ added in v0.3.0
func (a DeleteAction) Acting() string
func (DeleteAction) Verb ¶ added in v0.3.0
func (a DeleteAction) Verb() string
type ProgressBar ¶
ProgressBar is a tview primitive that renders a horizontal progress bar. It embeds tview.Box so it participates in layout and can optionally have a border and title.
func NewProgressBar ¶
func NewProgressBar() *ProgressBar
NewProgressBar returns a new ProgressBar with default settings.
func (*ProgressBar) Draw ¶
func (p *ProgressBar) Draw(screen tcell.Screen)
Draw implements tview.Primitive. It draws the border (via Box.Draw) and then fills the inner rect with a segmented progress bar.
func (*ProgressBar) GetProgress ¶
func (p *ProgressBar) GetProgress() int
GetProgress returns the current progress in the range [0, 100].
func (*ProgressBar) SetProgress ¶
func (p *ProgressBar) SetProgress(progress int)
SetProgress sets the current progress in the range [0, 100].
func (*ProgressBar) SetUseColor ¶
func (p *ProgressBar) SetUseColor(use bool) *ProgressBar
SetUseColor controls whether the filled segment is highlighted with colour.
type UI ¶
UI struct
func CreateUI ¶
func CreateUI( app common.TermApplication, screen tcell.Screen, output io.Writer, useColors bool, showApparentSize bool, showRelativeSize bool, useSIPrefix bool, opts ...Option, ) *UI
CreateUI creates the whole UI app
func (*UI) AnalyzePath ¶
AnalyzePath analyzes recursively disk usage for given path
func (*UI) ListDevices ¶
func (ui *UI) ListDevices(getter device.DevicesInfoGetter) error
ListDevices lists mounted devices and shows their disk usage
func (*UI) ReadAnalysis ¶
ReadAnalysis reads analysis report from JSON file
func (*UI) ReadFromStorage ¶
ReadFromStorage reads analysis data from persistent key-value storage
func (*UI) SetBrowseParentDirs ¶
func (ui *UI) SetBrowseParentDirs()
SetBrowseParentDirs enables navigating above the launch directory
func (*UI) SetChangeCwdFn ¶
SetChangeCwdFn sets function that can be used to change current working dir during dir browsing
func (*UI) SetCollapsePath ¶
SetCollapsePath sets the flag to collapse paths
func (*UI) SetConfirmQuit ¶ added in v0.3.0
SetConfirmQuit sets whether gdu asks for confirmation before quitting after a scan that took a noticeable amount of time
func (*UI) SetCurrentItemNameMaxLen ¶
SetCurrentItemNameMaxLen sets the maximum length of the path of the currently processed item to be shown in the progress modal
func (*UI) SetDefaultSorting ¶
SetDefaultSorting sets the default sorting
func (*UI) SetDeleteInBackground ¶
func (ui *UI) SetDeleteInBackground()
SetDeleteInBackground sets the flag to delete files in background
func (*UI) SetDeleteInParallel ¶
func (ui *UI) SetDeleteInParallel()
SetDeleteInParallel sets the flag to delete files in parallel
func (*UI) SetFooterBackgroundColor ¶
SetFooterBackgroundColor sets the color for the footer background
func (*UI) SetFooterNumberColor ¶
SetFooterNumberColor sets the color for the footer number
func (*UI) SetFooterTextColor ¶
SetFooterTextColor sets the color for the footer text
func (*UI) SetHeaderBackgroundColor ¶
SetHeaderBackgroundColor sets the color for the header background
func (*UI) SetHeaderHidden ¶
func (ui *UI) SetHeaderHidden()
SetHeaderHidden sets the flag to hide the header
func (*UI) SetHeaderTextColor ¶
SetHeaderTextColor sets the color for the header text
func (*UI) SetMarkedBackgroundColor ¶ added in v0.3.0
SetMarkedBackgroundColor sets the background color for marked items
func (*UI) SetMarkedTextColor ¶ added in v0.3.0
SetMarkedTextColor sets the text color for marked items
func (*UI) SetNoDeleteWithFilter ¶
func (ui *UI) SetNoDeleteWithFilter()
SetNoDelete disables delete when time filters are active
func (*UI) SetNoSpawnShell ¶
func (ui *UI) SetNoSpawnShell()
SetNoSpawnShell disables shell spawning
func (*UI) SetNoViewFile ¶
func (ui *UI) SetNoViewFile()
func (*UI) SetResultRowDirectoryColor ¶
SetResultRowDirectoryColor sets the color for the result row directory
func (*UI) SetResultRowNumberColor ¶
SetResultRowNumberColor sets the color for the result row number
func (*UI) SetSelectedBackgroundColor ¶
SetSelectedBackgroundColor sets the color for the highlighted selected text
func (*UI) SetSelectedTextColor ¶
SetSelectedTextColor sets the color for the highlighted selected text
func (*UI) SetShowBarPercentage ¶ added in v0.3.0
func (ui *UI) SetShowBarPercentage()
SetShowBarPercentage shows the numeric usage percentage next to the size bar
func (*UI) SetShowDiskProgressBar ¶
SetShowDiskProgressBar sets whether to show a progress bar when scanning a whole disk
func (*UI) SetShowItemCount ¶
func (ui *UI) SetShowItemCount()
SetShowItemCount sets the flag to show number of items in directory
func (*UI) SetShowMTime ¶
func (ui *UI) SetShowMTime()
SetShowMTime sets the flag to show last modification time of items in directory
func (*UI) SetShowSymlinkTarget ¶ added in v0.3.0
SetShowSymlinkTarget enables displaying the symlink target (name -> target)
func (*UI) SetTimeFilterWithInfo ¶
func (ui *UI) SetTimeFilterWithInfo(tf *timefilter.TimeFilter, loc *time.Location)
SetTimeFilterWithInfo sets both the time filter function and stores the filter info for display
func (*UI) UseOldSizeBar ¶
func (ui *UI) UseOldSizeBar()
UseOldSizeBar uses the old size bar (# chars) instead of the new one (unicode block elements)