On Fri, Sep 02, 2016 at 05:02:07PM -0700, Aioi Yuuko wrote: > Sorry, I was vague in my original email: What I meant was, I'm aware that > there are ways of getting it off the command line; I'm mostly curious about > getting it on my desktop so it's easy to glance at. Would my best bet be > running a script like that in a particular xterm, and marking that xterm as > sticky in fvwm?On 2 Sep 2016 16:22, Raf Czlonka <rczlo...@gmail.com> wrote: > >
$ systat vm Reyk > > On Fri, Sep 02, 2016 at 11:46:27PM BST, Aioi Yuuko wrote: > > > Hi, > > > > > > I'm trying to wean myself off external packages as much as possible. > > > Is there a common, accepted way of viewing, for instance, battery > > > life, with only included programs? > > > > Hi Aioi, > > > > There's the already mentioned apm(8) (i.e. -l, -m options) or you > > could run something like this: > > > > #!/bin/sh > > > > sysctl -n hw.sensors.acpiac0.indicator0 \ > > hw.sensors.acpibat0.watthour0 \ > > hw.sensors.acpibat0.watthour3 | awk 'NR == 1 { ac = $1 } > > NR == 2 { full = $1 } > > NR == 3 { remaining = $1 } > > END { if ( ac == "On" ) > > state = "charging" > > else > > state = "discharging" > > printf("%s %d%s %s%s\n", "Remaining battery life is", > > remaining/full*100, "% and it is", state, "\.") }' > > > > Regards, > > > > Raf > --