Description
I use cointop for showing price data and my portfolio totals in waybar in sway. Within a few updates, the coinfiguration file is corrupted - I'm fairly sure there's no l 4E7D ocking on the file during write because it produces an invalid TOML file. This has a side effect of completely deleting my portfolio.
I would highly recommend splitting up this configuration file into practical use - there is absolutely NO reason whatever one would want to write a configuration file every single time you open an application. If you are doing this it suggests you should be storing something in .local/ or .cache/ instead.
Also consider storing portfolio data in a separate file (it belongs in .local actually) as this is not configuration - think of what you'd use, say, nixos or stow or a dotfiles manager for - you want to store your settings, not personal information.
Regardless, writes are highly destructive and should always be treated with care.