]> granicus.if.org Git - procps-ng/commit
top: Add unobtrusive XDG support
authorEarnestly <zibeon@gmail.com>
Wed, 11 Jan 2017 19:18:39 +0000 (19:18 +0000)
committerEarnestly <zibeon@gmail.com>
Tue, 17 Jan 2017 23:47:40 +0000 (23:47 +0000)
commitaf53e170b9927599110ff42842a8d52eabe00bef
treee449c208fb0bdda135582edcd8a4f3386c9422ff
parent75bb2dbccd3fc1c385fc27362f20d15454d68f3e
top: Add unobtrusive XDG support

By default the file HOME/.toprc will be prefered.  This ensures there
should be minimal breakage even if this file is later created by some
other means.  Otherwise we will follow the new behaviour described by
the XDG Base Directory Specification:

If the XDG_CONFIG_HOME environment variable is available we will attempt
to use this as XDG_CONFIG_HOME/procps/toprc otherwise we will fall-back
to HOME/.config/procps/toprc instead.

Signed-off-by: Earnestly <zibeon@gmail.com>
top/top.1
top/top.c