Skip to content

Separate config and data files for Windows#2051

Merged
joelim-work merged 1 commit into
gokcehan:masterfrom
joelim-work:windows-appdata
Jul 19, 2025
Merged

Separate config and data files for Windows#2051
joelim-work merged 1 commit into
gokcehan:masterfrom
joelim-work:windows-appdata

Conversation

@joelim-work

Copy link
Copy Markdown
Collaborator

This PR changes the layout of files managed by lf on Windows to be more similar to Unix, by having config files and data (application state) files in separate directories).


Config files consist of the following:

  • lfrc (config file)
  • colors (color configuration)
  • icons (icon configuration)

The following priority lists are used for determining the directory for config files:

Unix:

  • $LF_CONFIG_HOME
  • $XDG_CONFIG_HOME
  • ~/.config

Windows:

  • %LF_CONFIG_HOME%
  • %APPDATA%

Data files consist of the following:

  • files (clipboard for cut/copy)
  • marks (stores bookmarked directories)
  • tags (stores tagged files)
  • history (command history)

The following priority lists are used for determining the directory for data files:

Unix:

  • $LF_DATA_HOME
  • $XDG_DATA_HOME
  • ~/.local/share

Windows:

  • %LF_DATA_HOME%
  • %LOCALAPPDATA%

@joelim-work joelim-work merged commit 82a983d into gokcehan:master Jul 19, 2025
4 checks passed
@joelim-work joelim-work deleted the windows-appdata branch July 19, 2025 11:32
@joelim-work joelim-work added the breaking Pull requests that introduce breaking changes label Jul 19, 2025
@joelim-work joelim-work added this to the r37 milestone Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Pull requests that introduce breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Windows, Configuration should be located at AppData\Roaming, Not AppData\Local

1 participant