btop
btop copied to clipboard
[REQUEST/IDEA] Change the way btop treats its configuration file
Currently, every time you open or close a window in btop, or change the way processes are sorted, the config gets overwritten. This is unlike any other command line application that I know of. This can be annoying when writing the config manually, or if btop.conf
is managed by a dotfile manager like stow or chezmoi.
Instead, I propose addition of an additional file(maybe called btop.state
?), which would behave similarly to how the config file works now. The config would instead be used as a config file, e.g created if it doesn't exist but otherwise read only.
Options would be read in this priority:
-
btop.conf
-
btop.state
- reasonable defaults
To maintain backwards compatibility, I propose addition of a new config option, config_version
, which when set to 2, enables this new behavior. New configs created by btop would have config_version = 2
, and configs without this value set or with config_version = 1
would keep old behavior. If backwards compatibility with the old config behavior isn't desired, config_version
could instead be used to distinguish configs that require migration from the old behavior and new configs.