bottom icon indicating copy to clipboard operation
bottom copied to clipboard

Allow horizontal scrolling, either move the command/proc column to the right or separate the two

Open ClementTsang opened this issue 3 years ago • 1 comments

Describe the feature request

What is the feature of interest? Be clear and concise.

Would tackle the issue raised in https://github.com/ClementTsang/bottom/issues/432.

Moving the command column (however we do it) is consistent with tools like htop, and makes the most sense in terms of where to put the command column since it's usually huge, so putting it at the end avoids column space fighting.

Horizontal scrolling is also hugely helpful since it would mean columns that are too large to fit, even with proper space management, could still be seen on smaller width terminals. This will definitely have to be done.

Additional context/details

Provide any additional context or details here. What needs to be done, why, etc:

What I'm a little iffy on is how we want to tackle the "movement" of the command column. Should we keep behaviour consistent and allow toggling between command and program name, but just move the column? Or should we separate the two and just move command?

I'm leaning towards the latter, since it makes sense to keep the name of the program at column 2 still (at least by default, custom column order maybe coming in the near future), and makes the most sense given how bottom looks when launching (currently displaying with leftmost column given priority, and I assume most people would want the program name to be visible by default).

Some other stuff:

  • This change will introduce behaviour that might be "breaking" to some people if they're used to the command being in the second column. Will this be fine (I hope it's fine)?
  • How should this work with tree mode, if we go with the latter approach? Do we show tree mode in just the program column? Command? Both? Kinda just leaning towards both just the program column, maybe I'll just try them all.

ClementTsang avatar Mar 08 '21 20:03 ClementTsang

Personally, I would prefer to be able to pop a floating window with the focused command string rendered inside it, word-wrapped and cleanly formatted/indented (maybe even syntax-highlighted).

Command strings can get really long, making it awkward to read, especially in narrow windows. So using a floating window would eliminate a lot of awkward horizontal back-and-forths just to read the command.

musjj avatar Apr 26 '23 14:04 musjj