diff --git a/doc/man/man1/ncls.1.md b/doc/man/man1/ncls.1.md index fdfd22c6e..f238ecf44 100644 --- a/doc/man/man1/ncls.1.md +++ b/doc/man/man1/ncls.1.md @@ -32,7 +32,7 @@ ncls - List paths with rendering of multimedia **-a**|**--align** ***type***: Align images on **left**, **center**, or **right**. **-b**|**--blitter** ***blitter***: Blitter, one of **ascii**, **half**, -**quad**, **sex**, **braille**, or **pixel**. The default is ***pixel***. +**quad**, **sex**, **braille**, or **pixel**. The default is **pixel**. If the chosen blitter is unavailable, **ncls** will degrade (see **notcurses_visual(3)**). @@ -42,6 +42,9 @@ If the chosen blitter is unavailable, **ncls** will degrade (see paths: Run on the specified paths. If none are supplied, run on the current directory. +If no scaling is specified, **hires** will be used with the **pixel** blitter, +and **scalehi** will be used otherwise. + # NOTES Optimal display requires a terminal advertising the **rgb** terminfo(5) diff --git a/src/ls/main.cpp b/src/ls/main.cpp index 2e376a20f..a541e833f 100644 --- a/src/ls/main.cpp +++ b/src/ls/main.cpp @@ -185,6 +185,7 @@ int main(int argc, char* const * argv){ bool recursedirs = false; bool longlisting = false; bool dereflinks = false; + bool specified_scaling = false; ncpp::NCAlign alignment = ncpp::NCAlign::Right; ncblitter_e blitter = NCBLIT_PIXEL; ncscale_e scale = NCSCALE_SCALE_HIRES; @@ -227,6 +228,7 @@ int main(int argc, char* const * argv){ << optarg << ")" << std::endl; usage(std::cerr, argv[0], EXIT_FAILURE); } + specified_scaling = true; break; case 'd': directories = true; @@ -266,6 +268,11 @@ int main(int argc, char* const * argv){ blitter, scale, }; + if(blitter == NCBLIT_PIXEL && !specified_scaling){ + if(ctx.nc.check_pixel_support() > 0){ + ctx.scaling = NCSCALE_NONE_HIRES; + } + } ctx.nc.cursor_disable(); keep_working = true; for(auto s = 0u ; s < procs ; ++s){