variable

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CurrentVersion      = "v1.3.0"
	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.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")
	CustomTrashDirectory      = filepath.Join(xdg.DataHome, "Trash")
	CustomTrashDirectoryFiles = filepath.Join(xdg.DataHome, "Trash", "files")
	CustomTrashDirectoryInfo  = 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.Context)

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