Separate config and data files for Windows (#2051)
This commit is contained in:
1 parent
93400c11a0
commit
82a983d934
4 files changed
+25
-26
No files matched your search
@@ -319,19 +319,19 @@ Configuration files should be located at:
|
|||||||
|
|
||||||
OS system-wide user-specific
|
OS system-wide user-specific
|
||||||
Unix /etc/lf/lfrc ~/.config/lf/lfrc
|
Unix /etc/lf/lfrc ~/.config/lf/lfrc
|
||||||
Windows C:\ProgramData\lf\lfrc C:\Users\<user>\AppData\Local\lf\lfrc
|
Windows C:\ProgramData\lf\lfrc C:\Users\<user>\AppData\Roaming\lf\lfrc
|
||||||
|
|
||||||
The colors file should be located at:
|
The colors file should be located at:
|
||||||
|
|
||||||
OS system-wide user-specific
|
OS system-wide user-specific
|
||||||
Unix /etc/lf/colors ~/.config/lf/colors
|
Unix /etc/lf/colors ~/.config/lf/colors
|
||||||
Windows C:\ProgramData\lf\colors C:\Users\<user>\AppData\Local\lf\colors
|
Windows C:\ProgramData\lf\colors C:\Users\<user>\AppData\Roaming\lf\colors
|
||||||
|
|
||||||
The icons file should be located at:
|
The icons file should be located at:
|
||||||
|
|
||||||
OS system-wide user-specific
|
OS system-wide user-specific
|
||||||
Unix /etc/lf/icons ~/.config/lf/icons
|
Unix /etc/lf/icons ~/.config/lf/icons
|
||||||
Windows C:\ProgramData\lf\icons C:\Users\<user>\AppData\Local\lf\icons
|
Windows C:\ProgramData\lf\icons C:\Users\<user>\AppData\Roaming\lf\icons
|
||||||
|
|
||||||
The selection file should be located at:
|
The selection file should be located at:
|
||||||
|
|
||||||
@@ -365,12 +365,11 @@ You can configure these locations with the following variables given with their
|
|||||||
~/.local/share
|
~/.local/share
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
%ProgramData%
|
|
||||||
C:\ProgramData
|
|
||||||
|
|
||||||
%LF_CONFIG_HOME%
|
%LF_CONFIG_HOME%
|
||||||
|
%APPDATA%
|
||||||
|
|
||||||
|
%LF_DATA_HOME%
|
||||||
%LOCALAPPDATA%
|
%LOCALAPPDATA%
|
||||||
C:\Users\<user>\AppData\Local
|
|
||||||
|
|
||||||
A sample configuration file can be found at
|
A sample configuration file can be found at
|
||||||
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
|
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
|
||||||
|
|||||||
@@ -311,19 +311,19 @@ Configuration files should be located at:
|
|||||||
|
|
||||||
OS system-wide user-specific
|
OS system-wide user-specific
|
||||||
Unix /etc/lf/lfrc ~/.config/lf/lfrc
|
Unix /etc/lf/lfrc ~/.config/lf/lfrc
|
||||||
Windows C:\ProgramData\lf\lfrc C:\Users\<user>\AppData\Local\lf\lfrc
|
Windows C:\ProgramData\lf\lfrc C:\Users\<user>\AppData\Roaming\lf\lfrc
|
||||||
|
|
||||||
The colors file should be located at:
|
The colors file should be located at:
|
||||||
|
|
||||||
OS system-wide user-specific
|
OS system-wide user-specific
|
||||||
Unix /etc/lf/colors ~/.config/lf/colors
|
Unix /etc/lf/colors ~/.config/lf/colors
|
||||||
Windows C:\ProgramData\lf\colors C:\Users\<user>\AppData\Local\lf\colors
|
Windows C:\ProgramData\lf\colors C:\Users\<user>\AppData\Roaming\lf\colors
|
||||||
|
|
||||||
The icons file should be located at:
|
The icons file should be located at:
|
||||||
|
|
||||||
OS system-wide user-specific
|
OS system-wide user-specific
|
||||||
Unix /etc/lf/icons ~/.config/lf/icons
|
Unix /etc/lf/icons ~/.config/lf/icons
|
||||||
Windows C:\ProgramData\lf\icons C:\Users\<user>\AppData\Local\lf\icons
|
Windows C:\ProgramData\lf\icons C:\Users\<user>\AppData\Roaming\lf\icons
|
||||||
|
|
||||||
The selection file should be located at:
|
The selection file should be located at:
|
||||||
|
|
||||||
@@ -358,12 +358,11 @@ with their order of precedences and their default values:
|
|||||||
~/.local/share
|
~/.local/share
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
%ProgramData%
|
|
||||||
C:\ProgramData
|
|
||||||
|
|
||||||
%LF_CONFIG_HOME%
|
%LF_CONFIG_HOME%
|
||||||
|
%APPDATA%
|
||||||
|
|
||||||
|
%LF_DATA_HOME%
|
||||||
%LOCALAPPDATA%
|
%LOCALAPPDATA%
|
||||||
C:\Users\<user>\AppData\Local
|
|
||||||
|
|
||||||
A sample configuration file can be found at
|
A sample configuration file can be found at
|
||||||
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
|
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" Automatically generated by Pandoc 3.7.0.2
|
.\" Automatically generated by Pandoc 3.7.0.2
|
||||||
.\"
|
.\"
|
||||||
.TH "LF" "1" "2025\-07\-18" "" "DOCUMENTATION"
|
.TH "LF" "1" "2025\-07\-19" "" "DOCUMENTATION"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lf \- terminal file manager
|
lf \- terminal file manager
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -336,7 +336,7 @@ Configuration files should be located at:
|
|||||||
.EX
|
.EX
|
||||||
OS system\-wide user\-specific
|
OS system\-wide user\-specific
|
||||||
Unix /etc/lf/lfrc \(ti/.config/lf/lfrc
|
Unix /etc/lf/lfrc \(ti/.config/lf/lfrc
|
||||||
Windows C:\(rsProgramData\(rslf\(rslfrc C:\(rsUsers\(rs<user>\(rsAppData\(rsLocal\(rslf\(rslfrc
|
Windows C:\(rsProgramData\(rslf\(rslfrc C:\(rsUsers\(rs<user>\(rsAppData\(rsRoaming\(rslf\(rslfrc
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
The colors file should be located at:
|
The colors file should be located at:
|
||||||
@@ -344,7 +344,7 @@ The colors file should be located at:
|
|||||||
.EX
|
.EX
|
||||||
OS system\-wide user\-specific
|
OS system\-wide user\-specific
|
||||||
Unix /etc/lf/colors \(ti/.config/lf/colors
|
Unix /etc/lf/colors \(ti/.config/lf/colors
|
||||||
Windows C:\(rsProgramData\(rslf\(rscolors C:\(rsUsers\(rs<user>\(rsAppData\(rsLocal\(rslf\(rscolors
|
Windows C:\(rsProgramData\(rslf\(rscolors C:\(rsUsers\(rs<user>\(rsAppData\(rsRoaming\(rslf\(rscolors
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
The icons file should be located at:
|
The icons file should be located at:
|
||||||
@@ -352,7 +352,7 @@ The icons file should be located at:
|
|||||||
.EX
|
.EX
|
||||||
OS system\-wide user\-specific
|
OS system\-wide user\-specific
|
||||||
Unix /etc/lf/icons \(ti/.config/lf/icons
|
Unix /etc/lf/icons \(ti/.config/lf/icons
|
||||||
Windows C:\(rsProgramData\(rslf\(rsicons C:\(rsUsers\(rs<user>\(rsAppData\(rsLocal\(rslf\(rsicons
|
Windows C:\(rsProgramData\(rslf\(rsicons C:\(rsUsers\(rs<user>\(rsAppData\(rsRoaming\(rslf\(rsicons
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
The selection file should be located at:
|
The selection file should be located at:
|
||||||
@@ -397,12 +397,11 @@ Unix
|
|||||||
\(ti/.local/share
|
\(ti/.local/share
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
%ProgramData%
|
|
||||||
C:\(rsProgramData
|
|
||||||
|
|
||||||
%LF_CONFIG_HOME%
|
%LF_CONFIG_HOME%
|
||||||
|
%APPDATA%
|
||||||
|
|
||||||
|
%LF_DATA_HOME%
|
||||||
%LOCALAPPDATA%
|
%LOCALAPPDATA%
|
||||||
C:\(rsUsers\(rs<user>\(rsAppData\(rsLocal
|
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
A sample configuration file can be found at \c
|
A sample configuration file can be found at \c
|
||||||
|
|||||||
+6
-4
@@ -74,23 +74,25 @@ func init() {
|
|||||||
Username: username,
|
Username: username,
|
||||||
}
|
}
|
||||||
|
|
||||||
data := cmp.Or(os.Getenv("LF_CONFIG_HOME"), os.Getenv("LOCALAPPDATA"))
|
config := cmp.Or(os.Getenv("LF_CONFIG_HOME"), os.Getenv("APPDATA"))
|
||||||
|
|
||||||
gConfigPaths = []string{
|
gConfigPaths = []string{
|
||||||
filepath.Join(os.Getenv("ProgramData"), "lf", "lfrc"),
|
filepath.Join(os.Getenv("ProgramData"), "lf", "lfrc"),
|
||||||
filepath.Join(data, "lf", "lfrc"),
|
filepath.Join(config, "lf", "lfrc"),
|
||||||
}
|
}
|
||||||
|
|
||||||
gColorsPaths = []string{
|
gColorsPaths = []string{
|
||||||
filepath.Join(os.Getenv("ProgramData"), "lf", "colors"),
|
filepath.Join(os.Getenv("ProgramData"), "lf", "colors"),
|
||||||
filepath.Join(data, "lf", "colors"),
|
filepath.Join(config, "lf", "colors"),
|
||||||
}
|
}
|
||||||
|
|
||||||
gIconsPaths = []string{
|
gIconsPaths = []string{
|
||||||
filepath.Join(os.Getenv("ProgramData"), "lf", "icons"),
|
filepath.Join(os.Getenv("ProgramData"), "lf", "icons"),
|
||||||
filepath.Join(data, "lf", "icons"),
|
filepath.Join(config, "lf", "icons"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data := cmp.Or(os.Getenv("LF_DATA_HOME"), os.Getenv("LOCALAPPDATA"))
|
||||||
|
|
||||||
gFilesPath = filepath.Join(data, "lf", "files")
|
gFilesPath = filepath.Join(data, "lf", "files")
|
||||||
gMarksPath = filepath.Join(data, "lf", "marks")
|
gMarksPath = filepath.Join(data, "lf", "marks")
|
||||||
gTagsPath = filepath.Join(data, "lf", "tags")
|
gTagsPath = filepath.Join(data, "lf", "tags")
|
||||||
|
|||||||
Reference in new issue
Block a user