variable

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CurrentVersion = "v1.5.0"
	// Allowing pre-releases with non production version
	// Set this to "" for production releases
	PreReleaseSuffix = ""

	// This gives most recent non-prerelease, non-draft release
	LatestVersionURL    = "https://api.github.com/repos/yorukot/superfile/releases/latest"
	LatestVersionGithub = "github.com/yorukot/superfile/releases/latest"

	// This will not break in windows. This is a relative path for Embed FS. It uses "/" only
	EmbedConfigDir           = "src/superfile_config"
	EmbedConfigFile          = EmbedConfigDir + "/config.toml"
	EmbedHotkeysFile         = EmbedConfigDir + "/hotkeys.toml"
	EmbedThemeDir            = EmbedConfigDir + "/theme"
	EmbedThemeCatppuccinFile = EmbedThemeDir + "/catppuccin-mocha.toml"
)

Variables

View Source
var (
	HomeDir           = xdg.Home
	SuperFileMainDir  = filepath.Join(xdg.ConfigHome, "superfile")
	SuperFileCacheDir = filepath.Join(xdg.CacheHome, "superfile")
	SuperFileDataDir  = filepath.Join(xdg.DataHome, "superfile")
	SuperFileStateDir = filepath.Join(xdg.StateHome, "superfile")

	// MainDir files
	ThemeFolder = filepath.Join(SuperFileMainDir, "theme")

	// DataDir files
	LastCheckVersion = filepath.Join(SuperFileDataDir, "lastCheckVersion")
	ThemeFileVersion = filepath.Join(SuperFileDataDir, "themeFileVersion")
	FirstUseCheck    = filepath.Join(SuperFileDataDir, "firstUseCheck")
	PinnedFile       = filepath.Join(SuperFileDataDir, "pinned.json")
	ToggleDotFile    = filepath.Join(SuperFileDataDir, "toggleDotFile")
	ToggleFooter     = filepath.Join(SuperFileDataDir, "toggleFooter")

	// StateDir files
	LogFile     = filepath.Join(SuperFileStateDir, "superfile.log")
	LastDirFile = filepath.Join(SuperFileStateDir, "lastdir")

	// Trash Directories
	DarwinTrashDirectory = filepath.Join(HomeDir, ".Trash")

	// These are used by github.com/rkoesters/xdg/trash package
	// We need to make sure that these directories exist
	LinuxTrashDirectory      = filepath.Join(xdg.DataHome, "Trash")
	LinuxTrashDirectoryFiles = filepath.Join(xdg.DataHome, "Trash", "files")
	LinuxTrashDirectoryInfo  = filepath.Join(xdg.DataHome, "Trash", "info")
)
View Source
var (
	ConfigFile  = filepath.Join(SuperFileMainDir, "config.toml")
	HotkeysFile = filepath.Join(SuperFileMainDir, "hotkeys.toml")

	// ChooserFile is the path where superfile will write the file's path, which is to be
	// opened, before exiting
	ChooserFile = ""

	// Other state variables
	FixHotkeys    = false
	FixConfigFile = false
	LastDir       = ""
	PrintLastDir  = false
)

These variables are actually not fixed, they are sometimes updated dynamically

Functions

func SetChooserFile added in v1.3.0

func SetChooserFile(path string)

func SetLastDir added in v1.3.0

func SetLastDir(path string)

func UpdateVarFromCliArgs added in v1.3.0

func UpdateVarFromCliArgs(c *cli.Command)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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