App-XTermUtils

 view release on metacpan or  search on metacpan

script/set-term-bgcolor  view on Meta::CPAN

#!perl

# Note: This script is a CLI for Riap function /XTerm/Util/set_term_bgcolor
# and generated automatically using Perinci::CmdLine::Gen version 0.498

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2021-05-26'; # DATE
our $DIST = 'App-XTermUtils'; # DIST
our $VERSION = '0.007'; # VERSION

use 5.010001;
use strict;
use warnings;

use Perinci::CmdLine::Any;

my $cmdline = Perinci::CmdLine::Any->new(
    url => "/XTerm/Util/set_term_bgcolor",
    program_name => "set-term-bgcolor",
    read_config => 0,
    read_env => 0,
);

$cmdline->run;

# ABSTRACT: Set terminal background color
# PODNAME: set-term-bgcolor

__END__

=pod

=encoding UTF-8

=head1 NAME

set-term-bgcolor - Set terminal background color

=head1 VERSION

This document describes version 0.007 of set-term-bgcolor (from Perl distribution App-XTermUtils), released on 2021-05-26.

=head1 SYNOPSIS

Usage:

 % set-term-bgcolor [--format=name] [--json] [--(no)naked-res]
     [--page-result[=program]] [--view-result[=program]] <rgb> [stderr]

=head1 DESCRIPTION

Set terminal background color. This prints the following xterm control sequence
to STDOUT (or STDERR, if ~stderr~ is set to true):

 \e]11;#123456\a

where I<123456> is the 6-hexdigit RGB color code.

=head1 OPTIONS

C<*> marks required options.

=head2 Main options

=over

=item B<--rgb>=I<s>*

=item B<--stderr>

=back

=head2 Output options

=over

=item B<--format>=I<s>

Choose output format, e.g. json, text.

Default value:

 undef

=item B<--json>

Set output format to json.

=item B<--naked-res>

When outputing as JSON, strip result envelope.

Default value:

 0

By default, when outputing as JSON, the full enveloped result is returned, e.g.:

    [200,"OK",[1,2,3],{"func.extra"=>4}]

The reason is so you can get the status (1st element), status message (2nd
element) as well as result metadata/extra result (4th element) instead of just
the result (3rd element). However, sometimes you want just the result, e.g. when
you want to pipe the result for more post-processing. In this case you can use
`--naked-res` so you just get:

    [1,2,3]


=item B<--page-result>

Filter output through a pager.



( run in 1.527 second using v1.01-cache-2.11-cpan-f56aa216473 )