App-BraveUtils

 view release on metacpan or  search on metacpan

script/pause-brave  view on Meta::CPAN

#!perl

# Note: This script is a CLI for Riap function /App/BraveUtils/pause_brave
# and generated automatically using Perinci::CmdLine::Gen version 0.502

use 5.010001;
use strict;
use warnings;
use Log::ger;

use Perinci::CmdLine::Any;

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-28'; # DATE
our $DIST = 'App-BraveUtils'; # DIST
our $VERSION = '0.002'; # VERSION

my $cmdline = Perinci::CmdLine::Any->new(
    url => "/App/BraveUtils/pause_brave",
    program_name => "pause-brave",
    log => 1,
    read_config => 0,
    read_env => 0,
);

$cmdline->run;

# ABSTRACT: Pause (kill -STOP) Brave
# PODNAME: pause-brave

__END__

=pod

=encoding UTF-8

=head1 NAME

pause-brave - Pause (kill -STOP) Brave

=head1 VERSION

This document describes version 0.002 of pause-brave (from Perl distribution App-BraveUtils), released on 2023-10-28.

=head1 SYNOPSIS

B<pause-brave> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)

B<pause-brave> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)

B<pause-brave> [B<L<--cmndline-pat|/"--cmndline-pat=s">>=I<L<re_from_str|Sah::Schema::re_from_str>>] [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>]...

=head1 DESCRIPTION

A modern browser now runs complex web pages and applications. Despite browser's
power management feature, these pages/tabs on the browser often still eat
considerable CPU cycles even though they only run in the background. Pausing
(kill -STOP) the browser processes is a simple and effective way to stop CPU
eating on Unix and prolong your laptop battery life. It can be performed
whenever you are not using your browser for a little while, e.g. when you are
typing on an editor or watching a movie. When you want to use your browser
again, simply unpause (kill -CONT) it.

=head1 OPTIONS

C<*> marks required options.

=head2 Main options

=over

=item B<--user>=I<s@>

Kill browser processes that belong to certain user(s) only.

Can be specified multiple times.

=item B<--users-json>=I<s>

Kill browser processes that belong to certain user(s) only (JSON-encoded).

See C<--user>.

=back

=head2 Filtering options

=over

=item B<--cmndline-pat>=I<s>

Filter processes using regex against their cmndline.

If one of the C<*-pat> options are specified, then instead of the default
heuristic rules to find the browser processes, these C<*-pat> options are solely
used to determine which processes are the browser processes.


=item B<--exec-pat>=I<s>

Filter processes using regex against their exec.

If one of the C<*-pat> options are specified, then instead of the default
heuristic rules to find the browser processes, these C<*-pat> options are solely
used to determine which processes are the browser processes.


=item B<--fname-pat>=I<s>

Filter processes using regex against their fname.

If one of the C<*-pat> options are specified, then instead of the default
heuristic rules to find the browser processes, these C<*-pat> options are solely
used to determine which processes are the browser processes.


=item B<--pid-pat>=I<s>

Filter processes using regex against their pid.



( run in 0.565 second using v1.01-cache-2.11-cpan-39bf76dae61 )