recent

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package recent remembers which projects were opened, so the home screen can offer the common path in one keypress rather than three levels of explorer.

Index

Constants

View Source
const Max = 20

Max is how many projects are kept: long enough to cover a week of work, short enough that the card stays a shortlist rather than becoming a history.

Variables

This section is empty.

Functions

func Add

func Add(configDir string, ref forge.Ref) error

Add puts ref at the top, drops any earlier visit to the same project, and trims the list to Max.

func List

func List(configDir string, n int) ([]forge.Ref, error)

List reads the most recent n projects, newest first.

A missing file, an unreadable one and a corrupt one all list nothing and report no error. This is a convenience cache: none of those is worth stopping the home screen for, and every one of them is indistinguishable to the reader from "you have not opened anything yet".

func Path

func Path(configDir string) string

Path is where the list lives, beside the stacks the same config dir holds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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