Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2020 06:36:18 +0000
From:      Alexey Dokuchaev <danfe@freebsd.org>
To:        T??l Coosemans <tijl@freebsd.org>
Cc:        Philip Paeps <philip@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r355978 - head/usr.bin/top
Message-ID:  <20200116063618.GA76153@FreeBSD.org>
In-Reply-To: <20200115190958.13a33cb4@FreeBSD.org>
References:  <201912210503.xBL53LCh072168@repo.freebsd.org> <20200115190958.13a33cb4@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 15, 2020 at 07:09:58PM +0100, T??l Coosemans wrote:
> On Sat, 21 Dec 2019 05:03:21 +0000 (UTC) Philip Paeps wrote:
> > New Revision: 355978
> > URL: https://svnweb.freebsd.org/changeset/base/355978
> > 
> > Log:
> >   top: display battery capacity remaining
> >   
> >   Submitted by: Antranig Vartanian <antranigv@freebsd.am>
> >   Reviewed by:  imp, philip
> >   Differential Revision:        https://reviews.freebsd.org/D22871
> > 
> > @@ -1322,6 +1322,15 @@ i_uptime(struct timeval *bt, time_t *tod)
> >      }
> >  }
> >  
> > +void
> > +i_battery(int nbat, int batt)
> > +{
> > +
> > +	if (nbat > 0) {
> > +		printf("; battery: %d%%", batt);
> 
> It doesn't fit.  There's only room for "; b":
> 
> last pid: 33047;  load averages:  1.17,  1.25,  1.34; b up 3+07:35:37 ...

TBH, I don't think it belongs in that line in the first place (leaving
aside the argument whether it belongs to the top(1) at all).  At least
it should probably be printed on its own line, with potential other
power/green-related metrics, and hidden by default.

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200116063618.GA76153>