Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.windows.x > #624
| From | Kragen Javier Sitaker <kragen@canonical.org> |
|---|---|
| Newsgroups | comp.windows.x |
| Subject | Re: a battery monitor |
| Date | 2026-09-02 00:52 -0300 |
| Organization | Primarily biological and memetic |
| Message-ID | <877bl48g2v.fsf@debian> (permalink) |
| References | <87v78oop87.fsf@safunu.org> |
Anton Antimo <anton@safunu.org> writes:
> So, yes, the program is more like a progress bar to be used by some kind
> of shell program. Here's how I've been using it. My system has this
> program called acpi, which gives me battery information:
>
> %acpi -b
> Battery 0: Charging, 91%, 00:18:43 until charged
>
> I run CWM, the calm window manager. So from my ~/xinitrc, I run:
>
> while true; \
> do acpi -b | awk '{printf("%d\n",$4)}' | tr -d '%,' && sleep 60; \
> done | xbattery 220x40-0-0 &
This is a good idea!
X-Windows makes it a lot more trouble to write than it really ought to
be. In theory, it ought to be doable in much less code, but X really
makes your life hard there. (I haven’t tested the code, but I assume
you’re posting a working version, and the code looks fine at a glance,
so I'm sure it’s fine.)
Kragen
Back to comp.windows.x | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
a battery monitor Anton Antimo <anton@safunu.org> - 2026-09-01 14:28 -0300
Re: a battery monitor Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-02 00:52 -0300
Re: a battery monitor Anton Antimo <anton@safunu.org> - 2026-09-02 12:22 -0300
Re: a battery monitor Anton Antimo <anton@safunu.org> - 2026-09-11 16:58 -0300
Re: a battery monitor Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-02 21:45 +0000
Re: a battery monitor Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-03 12:34 +0800
Re: a battery monitor Eli the Bearded <*@eli.users.panix.com> - 2026-09-03 05:30 +0000
Re: a battery monitor Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-03 21:24 +0000
Re: a battery monitor Eli the Bearded <*@eli.users.panix.com> - 2026-09-04 02:51 +0000
Re: a battery monitor David Brown <david.brown@hesbynett.no> - 2026-09-03 09:28 +0200
Re: a battery monitor boltar@caprica.universe - 2026-09-03 15:55 +0000
Re: a battery monitor David Brown <david.brown@hesbynett.no> - 2026-09-04 09:07 +0200
Re: a battery monitor Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-04 15:14 +0800
Re: a battery monitor Lane W <cactus_DAC@yahoo.com> - 2026-09-04 05:32 -0600
Re: a battery monitor scott@slp53.sl.home (Scott Lurndal) - 2026-09-04 14:29 +0000
Re: a battery monitor Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-04 23:17 +0800
Re: a battery monitor boltar@caprica.universe - 2026-09-05 09:39 +0000
Re: a battery monitor gazelle@shell.xmission.com (Kenny McCormack) - 2026-09-04 12:05 +0000
Re: a battery monitor Anton Antimo <anton@safunu.org> - 2026-09-02 18:48 -0300
csiph-web