Added --blocks flag to force block output

This commit is contained in:
Joel Kuhn 2021-04-23 09:35:23 -04:00
parent 779b93f49f
commit d47d33d3f3
2 changed files with 13 additions and 0 deletions

View File

@ -37,11 +37,17 @@ impl<'a> Config<'a> {
let transparent = matches.is_present("transparent");
let use_blocks = matches.is_present("blocks");
let viuer_config = ViuerConfig {
transparent,
width,
height,
absolute_offset: false,
use_kitty: !use_blocks,
use_iterm: !use_blocks,
#[cfg(feature = "sixel")]
sixel: !use_blocks,
..Default::default()
};

View File

@ -78,6 +78,13 @@ fn main() {
.takes_value(true)
.help("Play gif at the given frame rate"),
)
.arg(
Arg::with_name("blocks")
.short("b")
.long("blocks")
.takes_value(false)
.help("Force block output"),
)
.get_matches();
let conf = Config::new(&matches);