From: Michael Stapelberg Date: Fri, 24 Oct 2008 21:45:45 +0000 (+0200) Subject: Add support for differently named uevent data and hint for 9pnet_fd X-Git-Tag: 1.0~39 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=554a984fe6b8f29059cfa304778a465dce46c9d3;p=i3%2Fi3status Add support for differently named uevent data and hint for 9pnet_fd --- diff --git a/wmiistatus.1 b/wmiistatus.1 index 4a77a5f..f22d583 100644 --- a/wmiistatus.1 +++ b/wmiistatus.1 @@ -90,8 +90,10 @@ System-wide configuration file. .SH MOUNTING WMII'S PSEUDO FILESYSTEM As of now (October 2008, Linux 2.6.27) you can mount wmii's 9P pseudo filesystem using: .PP -.Vb 1 +.Vb 3 mount -t 9p -o rw,trans=unix,uname=michael,dfltuid=1000,dfltgid=50,name=michael,noauto,noextend /tmp/ns.michael.:0/wmii /mnt/wmii +# Perhaps you need to load module 9pnet_fd if that does not work +modprobe 9pnet_fd .Ve .SH SEE ALSO diff --git a/wmiistatus.c b/wmiistatus.c index e99625a..ffa86e3 100644 --- a/wmiistatus.c +++ b/wmiistatus.c @@ -189,9 +189,11 @@ static char *get_battery_info() { (void)read(fd, buf, sizeof(buf)); for (walk = buf, last = buf; (walk-buf) < 1024; walk++) if (*walk == '=') { - if (BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_FULL_DESIGN")) + if (BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_FULL_DESIGN") || + BEGINS_WITH(last, "POWER_SUPPLY_CHARGE_FULL_DESIGN")) full_design = atoi(walk+1); - else if (BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_NOW")) + else if (BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_NOW") || + BEGINS_WITH(last, "POWER_SUPPLY_CHARGE_NOW")) remaining = atoi(walk+1); else if (BEGINS_WITH(last, "POWER_SUPPLY_CURRENT_NOW")) present_rate = atoi(walk+1);