btop icon indicating copy to clipboard operation
btop copied to clipboard

[REQUEST] Store built-in themes differently in config file

Open Kernald opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. When sharing configuration files across different machines (and OSs), having a hard-coded path is not ideal. Having my configuration file shared between a Linux and a macOS, the only diff I have between the two is the color_theme entry. On Linux:

color_theme = "/usr/share/btop/themes/nord.theme"

On macOS:

color_theme = "/opt/homebrew/Cellar/btop/1.2.9/share/btop/themes/nord.theme"

(Side-note: what happens on macOS when btop is updated? I suspect this path becomes invalid?)

Describe the solution you'd like Avoid any hard-coded path. One option could be to copy/symlink the built-in themes in $XDG_CONFIG_PATH/btop/themes on startup or when selecting a built-in theme. Another one could be to only store the name for built-in themes rather than the full path.

Describe alternatives you've considered N/A

Additional context N/A

Kernald avatar Oct 11 '22 00:10 Kernald

I just realised that storing just the name of the theme (e.g. nord.theme) without any path worked just fine as long as the theme is in the default folder or $XDG_CONFIG_PATH/btop/themes. What would still be nice if it was persisted in that way rather than the hard-coded path, but that's obviously a much lower priority as reading the file with just the name works just fine.

Kernald avatar Oct 11 '22 02:10 Kernald