On Fri, Feb 11, 2022 at 05:31:43PM +0000, Jason McIntyre wrote:
> On Thu, Feb 10, 2022 at 02:59:48PM +0100, Jan Stary wrote:
> > With the recent change to apm -m,
> > reporting either the battery lifetime
> > or the estimated time to charge (thank you),
> > the manpage seems to have been left behind.
> > 
> > While here, tweak some of the wording:
> > 
> > - "in minutes" or "in percent" is not parenthetical; say it explicitly
> 
> i guess this is better
> 
> > - surely -a displays the charger status, not the charger
> 
> yes, the brackets were badly placed.
> 
> > - AC is AC, not A/C, right?
> > 
> 
> i'm less sure. i have seen a/c written but am not really up on this. i
> think "AC" is clear enough. but if we make this change, we want to
> change the instance in apm.c too. i've added that in my diff at end, but
> really need some other developer feedback about whether A/C->AC is
> desireable.
> 
> so i agree broadly with the diff. but some notes after the diff:
> 
> >     Jan
> > 
> > 
> > Index: apm.8
> > ===================================================================
> > RCS file: /cvs/src/usr.sbin/apm/apm.8,v
> > retrieving revision 1.44
> > diff -u -p -r1.44 apm.8
> > --- apm.8   3 Nov 2021 19:54:28 -0000       1.44
> > +++ apm.8   10 Feb 2022 13:52:38 -0000
> > @@ -59,7 +59,7 @@ The options are as follows:
> >  .It Fl A
> >  Switch to automatic performance adjustment mode (the default).
> >  .It Fl a
> > -Display the external charger (A/C status).
> > +Display the external charger (AC) status.
> >  0 means disconnected, 1
> >  means connected, 2 means backup power source, and 255 means unknown.
> >  .It Fl b
> > @@ -82,9 +82,10 @@ setting
> >  .Va hw.setperf
> >  to 0.
> >  .It Fl l
> > -Display the estimated battery lifetime (in percent).
> > +Display the estimated battery lifetime in percent.
> >  .It Fl m
> > -Display the estimated battery lifetime (in minutes).
> > +Display the estimated battery lifetime in minutes when running or battery,
> > +or the estimated time to recharge when running on an external charger.
> >  .It Fl P
> >  Display the performance adjustment mode.
> >  0 means manual mode.
> > 
> 
> - i think there really should be a comma after "lifetime"
> - i don;t like the structure of the -m changes. it makes "minutes" apply
>   explicitly to the first clause, but only implict with the second.
> - i think we can getter a better text by defining -l and -m as
>   essentially the same, but note the difference to -m when charging as a
>   separate sentence.
> 
> so this diff:
> 
> Index: apm.8
> ===================================================================
> RCS file: /cvs/src/usr.sbin/apm/apm.8,v
> retrieving revision 1.44
> diff -u -p -r1.44 apm.8
> --- apm.8     3 Nov 2021 19:54:28 -0000       1.44
> +++ apm.8     11 Feb 2022 17:28:03 -0000
> @@ -59,7 +59,7 @@ The options are as follows:
>  .It Fl A
>  Switch to automatic performance adjustment mode (the default).
>  .It Fl a
> -Display the external charger (A/C status).
> +Display the external charger (AC) status.
>  0 means disconnected, 1
>  means connected, 2 means backup power source, and 255 means unknown.
>  .It Fl b
> @@ -82,9 +82,10 @@ setting
>  .Va hw.setperf
>  to 0.
>  .It Fl l
> -Display the estimated battery lifetime (in percent).
> +Display the estimated battery lifetime, in percent.
>  .It Fl m
> -Display the estimated battery lifetime (in minutes).
> +Display the estimated battery lifetime, in minutes.
> +If charging, the estimated time to fully charge is displayed instead.
>  .It Fl P
>  Display the performance adjustment mode.
>  0 means manual mode.
> Index: apm.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/apm/apm.c,v
> retrieving revision 1.40
> diff -u -p -r1.40 apm.c
> --- apm.c     6 Feb 2022 09:07:42 -0000       1.40
> +++ apm.c     11 Feb 2022 17:28:03 -0000
> @@ -394,7 +394,7 @@ balony:
>               }
>  
>               if (doac)
> -                     printf("A/C adapter state: %s\n",
> +                     printf("AC adapter state: %s\n",
>                           ac_state(reply.batterystate.ac_state));
>  
>               if (doperf)
> 
> what do you think?
> 
> jmc

i just went ahead and committed this. thanks for your diff!
jmc

Reply via email to