lnav icon indicating copy to clipboard operation
lnav copied to clipboard

sidebars: UI proposal

Open dmig-alarstudios opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. Currently, the interface has vertical bars as sidebars, which sometimes colored. These sidebars interfere with the easiest way of copying lines -- using a mouse (I remember one-two issues related to copying). The use of these sidebars as far as I've seen is to highlight them with colors marking errors, search results e.t.c.

Describe the solution you'd like My proposal is: just don't draw lines but use column background colors for error/search result highlights. This will give extra 2 columns to the log output and also will allow using more columns as sidebars. Also, this way it will not add extra characters to the copied text.

dmig-alarstudios avatar Feb 20 '21 07:02 dmig-alarstudios

This sounds interesting but will affect highlighted words which happen to be displayed across columns used as sidebars but I guess one can live with this.

Do you know there is lo-fi mode? From https://docs.lnav.org/en/latest/hotkeys.html#display

Switch to lo-fi mode. The displayed log lines will be dumped to the terminal without any decorations so they can be copied easily.

which is also mentioned in the FAQ question How can I copy & paste without decorations?

piotr-dobrogost avatar Feb 20 '21 09:02 piotr-dobrogost

Currently, the interface has vertical bars as sidebars, which sometimes colored. These sidebars interfere with the easiest way of copying lines -- using a mouse (I remember one-two issues related to copying).

The main problem with doing a drag select / copy in the terminal is that it will truncate long lines (unless you're always using word-wrap).

The use of these sidebars as far as I've seen is to highlight them with colors marking errors, search results e.t.c.

The right bar is a proportional scroll bar that, yes, shows: errors, warnings, search hits, and bookmarks. The left sidebar shows which file a log message comes from, which is handy when there are lots of messages from different files mixed together.

My proposal is: just don't draw lines but use column background colors for error/search result highlights.

I think I tried this initially, but didn't like the result. I really like having some sort of proportional scroll bar...

In the future, I plan to put a timeline along the top (like sumologic/splunk) as a replacement for the right sidebar. So, a drag-select in the terminal should "work" and the left sidebar is not as annoying.

tstack avatar Feb 20 '21 18:02 tstack

I think I tried this initially, but didn't like the result. I really like having some sort of proportional scroll bar...

I'd suggest adding this as an option. There are a number of opportunities it gives (let's assume we have 256+ colors):

  • using dim background colors will make these bars less distractive
  • you can change their widths to anything other than 1 column (another option?)
  • you can change their position freely
  • you can add more than 2 bars!

And all that -- without interference with log output!

dmig-alarstudios avatar Feb 25 '21 09:02 dmig-alarstudios