From owner-svn-src-head@freebsd.org Thu Jan 16 06:36:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2108222AEC4; Thu, 16 Jan 2020 06:36:19 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47yvbl031jz4Wqh; Thu, 16 Jan 2020 06:36:19 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id EEADF8BCC; Thu, 16 Jan 2020 06:36:18 +0000 (UTC) Date: Thu, 16 Jan 2020 06:36:18 +0000 From: Alexey Dokuchaev To: T??l Coosemans Cc: Philip Paeps , 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> References: <201912210503.xBL53LCh072168@repo.freebsd.org> <20200115190958.13a33cb4@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200115190958.13a33cb4@FreeBSD.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jan 2020 06:36:19 -0000 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 > > 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