App-XTermUtils

 view release on metacpan or  search on metacpan

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


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

$cmdline->run;

# ABSTRACT: Get terminal background color
# PODNAME: get-term-bgcolor

__END__

=pod

=encoding UTF-8

=head1 NAME

get-term-bgcolor - Get terminal background color

=head1 VERSION

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

=head1 SYNOPSIS

Usage:

 % get-term-bgcolor [--format=name] [--json] [--(no)naked-res]
     [--no-query-terminal] [--no-read-colorfgbg] [--noquery-terminal]
     [--noread-colorfgbg] [--page-result[=program]] [--query-terminal]
     [--read-colorfgbg] [--view-result[=program]]

=head1 DESCRIPTION

Get the terminal's current background color (in 6-hexdigit format e.g. 000000 or
ffff33), or undef if unavailable. This routine tries the following mechanisms,
from most useful to least useful, in order. Each mechanism can be turned off via
argument.

I<query_terminal>. Querying the terminal is done via sending the following xterm
 control sequence:

 \e]11;?\a

(or \e]11;?\017). A compatible terminal will issue back the same sequence but
with the question mark replaced by the RGB code, e.g.:

 \e]11;rgb:0000/0000/0000\a

I<read_colorfgbg>. Some terminals like Konsole set the environment variable
C<COLORFGBG> containing 16-color color code for foreground and background, e.g.:
C<15;0>.

=head1 OPTIONS

C<*> marks required options.

=head2 Main options

=over

script/get-term-fgcolor  view on Meta::CPAN

 control sequence:

 \e]10;?\a

(or \e]10;?\017). A compatible terminal will issue back the same sequence but
with the question mark replaced by the RGB code, e.g.:

 \e]10;rgb:0000/0000/0000\a

I<read_colorfgbg>. Some terminals like Konsole set the environment variable
C<COLORFGBG> containing 16-color color code for foreground and background, e.g.:
C<15;0>.

=head1 OPTIONS

C<*> marks required options.

=head2 Main options

=over

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


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.

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


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

$cmdline->run;

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

__END__

=pod

=encoding UTF-8

=head1 NAME

set-term-fgcolor - Set terminal background color

=head1 VERSION

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

=head1 SYNOPSIS

Usage:

 % set-term-fgcolor [--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.

script/term-bgcolor-is-dark  view on Meta::CPAN


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

$cmdline->run;

# ABSTRACT: Check if terminal background color is dark
# PODNAME: term-bgcolor-is-dark

__END__

=pod

=encoding UTF-8

=head1 NAME

term-bgcolor-is-dark - Check if terminal background color is dark

=head1 VERSION

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

=head1 SYNOPSIS

Usage:

 % term-bgcolor-is-dark [--format=name] [--json] [--(no)naked-res]

script/term-bgcolor-is-light  view on Meta::CPAN


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

$cmdline->run;

# ABSTRACT: Check if terminal background color is light
# PODNAME: term-bgcolor-is-light

__END__

=pod

=encoding UTF-8

=head1 NAME

term-bgcolor-is-light - Check if terminal background color is light

=head1 VERSION

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

=head1 SYNOPSIS

Usage:

 % term-bgcolor-is-light [--format=name] [--json] [--(no)naked-res]



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