Description of problem: top shows its configuration directly in home (~/.toprc). I would suggest following the xdg base dir spec that is widely adopted (GNOME, KDE, git, transmission etc). References: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html A non spec rationale http://ploum.net/207-modify-your-application-to-use-xdg-folders/ A c library implementation https://github.com/devnev/libxdg-basedir
https://gitlab.com/procps-ng/procps/-/commit/a81a74a1df01e3bd92a463aca2167bcfa9b3ee9f