4

Since updating to procps-ng 3.3.10 my top(1) looks like this:

Not so sane...

Instead of:

...somewhat sane

Not only are these colours annoying & offensive, I can't get it to sort as the "old" top(1) (O no longer works, and can't get f or F to work).

Since I have more useful & interesting things to do with my allotted time of existence on this planet than figuring all of this out, I would prefer to just get the "old" layout back (which works just fine), without compiling it myself (so I can just use my system's package manager).

The NEWS file says:

* top offers new startup defaults, plus ./configure --disable-modern-top

The wording of "startup defaults" suggests there is a way to configure top in a way that's the same (or very similar) to the "old".

I've already looked at top/top.h, and the below settings are different, but I don't know how to get the originals (defined by ORIG_TOPDEFS) back through either a set of switches, or a config file.

#ifdef ORIG_TOPDEFS
#define DEF_WINFLGS ( View_LOADAV | View_STATES | View_CPUSUM | View_MEMORY \
   | Show_HIBOLD | Show_HIROWS | Show_IDLEPS | Show_TASKON | Show_JRNUMS \
   | Qsrt_NORMAL )
#define DEF_GRAPHS2  0, 0
#define DEF_SCALES2  SK_Kb, SK_Kb
#define ALT_WINFLGS  DEF_WINFLGS
#define ALT_GRAPHS2  0, 0
#else
#define DEF_WINFLGS ( View_LOADAV | View_STATES | View_MEMORY \
   | Show_COLORS | Show_FOREST | Show_HIROWS | Show_IDLEPS | Show_JRNUMS | Show_TASKON \
   | Qsrt_NORMAL )
#define DEF_GRAPHS2  1, 2
#define DEF_SCALES2  SK_Gb, SK_Mb
#define ALT_WINFLGS (DEF_WINFLGS | Show_HIBOLD) & ~Show_FOREST
#define ALT_GRAPHS2  2, 0
#endif


#ifdef ORIG_TOPDEFS
#define DEF_FIELDS  "¥¨³´»½ÀÄ·º¹Å&')*+,-./012568<>?ABCFGHIJKLMNOPQRSTUVWXYZ[" RCF_PLUS_H
#else
#define DEF_FIELDS  "¥&K¨³´»½@·º¹56ÄFÅ')*+,-./0128<>?ABCGHIJLMNOPQRSTUVWXYZ[" RCF_PLUS_H
#endif
1
  • Not what you're asking for, but being unhappy with top might be a good opportunity to abandon it in favor of htop. It's default look is much closer to "modern top" (in fact probably inspired it?) but it's easy to configure (F2). Commented Apr 2, 2015 at 8:35

1 Answer 1

8

Set options you want (see help with ? key), then save them with W

So, to get something like old top back, press zV1W

expected result

Mine ~/.toprc currently looks like this:

top's Config File (Linux processes with windows)
Id:i, Mode_altscr=0, Mode_irixps=1, Delay_time=1.500, Curwin=0
Def fieldscur=¥&Kš³Ž»œ@·º¹56ÄFÅ')*+,-./0128<>?ABCGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghij
    winflags=192820, sortindx=18, maxtasks=0, graph_cpus=1, graph_mems=2
    summclr=1, msgsclr=1, headclr=3, taskclr=1
Job fieldscur=¥Š¹·º(³ŽÄ»œ@<§Å)*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
    winflags=163124, sortindx=0, maxtasks=0, graph_cpus=2, graph_mems=0
    summclr=6, msgsclr=6, headclr=7, taskclr=6
Mem fieldscur=¥º»<œŸ¿ÀÁMBNÃD34·Å&'()*+,-./0125689FGHIJKLOPQRSTUVWXYZ[\]^_`abcdefghij
    winflags=163124, sortindx=21, maxtasks=0, graph_cpus=2, graph_mems=0
    summclr=5, msgsclr=5, headclr=4, taskclr=5
Usr fieldscur=¥Š§šª°¹·ºÄÅ)+,-./1234568;<=>?@ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
    winflags=163124, sortindx=3, maxtasks=0, graph_cpus=2, graph_mems=0
    summclr=3, msgsclr=3, headclr=2, taskclr=3
Fixed_widest=0, Summ_mscale=2, Task_mscale=1, Zero_suppress=0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .