rio icon indicating copy to clipboard operation
rio copied to clipboard

Customizable configuration file location

Open nix6839 opened this issue 1 year ago • 4 comments

Currently, Rio does not support customization of the path to the config file. Ideas for supporting it are collected in this issue.

Current Behavior

On macOS and Linux (current)

$HOME/.config/rio/config.toml

On Windows (current)

%USERPROFILE%\AppData\Local\rio\config.toml

New Behavior (draft)

On macOS and Linux (new)

  1. $RIO_CONFIG_HOME/config.toml (if $RIO_CONFIG_HOME is set)
  2. $XDG_CONFIG_HOME/rio/config.toml (if $XDG_CONFIG_HOME is set)
  3. $HOME/.config/rio/config.toml (otherwise)

On Windows (new)

  1. %RIO_CONFIG_HOME%\config.toml (if %RIO_CONFIG_HOME% is set)
  2. %XDG_CONFIG_HOME%\rio\config.toml (if %XDG_CONFIG_HOME% is set)
  3. %APPDATA%\rio\config.toml (otherwise)

Feel free to share your ideas!

nix6839 avatar Nov 17 '23 04:11 nix6839

For windows we can use the XDG_CONFIG_HOME as well right?

raphamorim avatar Nov 23 '23 14:11 raphamorim

For windows we can use the XDG_CONFIG_HOME as well right?

Updated!

nix6839 avatar Nov 25 '23 08:11 nix6839

@raphamorim What do you think about the last fallback path on macOS being $HOME/Library/Application Support/rio/config.toml?

nix6839 avatar Nov 25 '23 08:11 nix6839

I would prefer to keep $HOME/.config/rio/config.toml in macos as the fallback for XDG_CONFIG_HOME and RIO_CONFIG is not set, mostly due to reasons of compatibility to old users

raphamorim avatar Nov 25 '23 14:11 raphamorim