write marks to marks file on quit

Related #76
This commit is contained in:
Gokcehan committed 2018-07-11 20:09:26 +03:00
1 parent 0d0f7451ac
commit 211bcd0444
5 files changed
+79

No files matched your search

+8
View File
@@ -28,6 +28,7 @@ var (
var (
gUser *user.User
gConfigPaths []string
gMarksPath string
)
func init() {
@@ -67,6 +68,13 @@ func init() {
filepath.Join(config, "lf", "lfrc"),
}
data := os.Getenv("XDG_DATA_HOME")
if data == "" {
data = filepath.Join(gUser.HomeDir, ".local", "share")
}
gMarksPath = filepath.Join(data, "lf", "marks")
gDefaultSocketPath = filepath.Join(os.TempDir(), fmt.Sprintf("lf.%s.sock", gUser.Username))
}