markbt / streampager

A pager for command output or large files
MIT License
45 stars 11 forks source link

FR: Dark theme #60

Open ilyagr opened 1 year ago

ilyagr commented 1 year ago

First of all, thanks for making streampager, it's really neat!

IMO, streampager looks great on a terminal with a light background and pretty bad on a terminal with a dark background. (See below for screenshots)

I'm thinking of implementing a much more simplistic version of https://github.com/markbt/streampager/issues/56 in the form of a dark theme. I am thinking of a theme config with possible values light, dark, and maybe auto. This would likely work for me as a replacement for #56, but could also comfortably coexist with the more elaborate configuration suggested in #56.

My current plan for the dark theme would be to have the status bar be white text on a dark-grey background instead of the current black-on-silver. This might change as I try differnet things. I'd also want the dark theme to be readable even on a terminal with a light background (if not necessarily beautiful).

The auto theme, if it is desired, would use something like https://github.com/dalance/termbg to try to pick the theme automatically.

Current theme (would be light):

image

(The bar looks even lighter in the default xterm theme)

image

On dark background, the light bar is somewhat distracting.

image

First pass at dark theme (normal color on dark grey option)

image

The dark theme on light background doesn't look as good as light theme, but still OK. The user should never see it.

image

TODO: Show black on blue

ilyagr commented 1 year ago

I'd also appreciate comments of whether others would find this useful. It's possible that having just a dark and a light theme is not enough of an improvement to be worth it.