walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
585 stars 17 forks source link

Adapt theme to terminal background #184

Closed walles closed 5 months ago

walles commented 5 months ago

Ask the terminal for its background color.

If the background color is bright, use the Tango style. If the background color is dark, use Native.

dark-native bright-tango
walles commented 5 months ago

@scottbilas would it be possible for you to help me test this Windows build of moar?

moar-auto-background.zip

It's supposed to Just Work (TM), and it should adapt moar's default style to the terminal window's background color.

What I want to make sure is it doesn't break on Windows. It works fine on macOS.

Please do:

  1. moar --debug anything.xyz
  2. Press q to exit
  3. Post the debug things moar printed after exit here.
walles commented 5 months ago

I managed to find a Windows machine to test on, nothing broken, nothing thrown, merging!

On a side note the Windows terminal seems not to support background color detection, but moar.exe handled that transparently so 🎉!