]> git.sur5r.net Git - i3/i3status/commitdiff
Add support for differently named uevent data and hint for 9pnet_fd
authorMichael Stapelberg <michael+x200@stapelberg.de>
Fri, 24 Oct 2008 21:45:45 +0000 (23:45 +0200)
committerMichael Stapelberg <michael+x200@stapelberg.de>
Fri, 24 Oct 2008 21:45:45 +0000 (23:45 +0200)
wmiistatus.1
wmiistatus.c

index 4a77a5f9436046a2aeda285b5b0be6e1167e6234..f22d583702fd32d0ab24aea6d5e00bc8ed0cd48b 100644 (file)
@@ -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
index e99625a8f5c87ea3c34920af88128c057a162aad..ffa86e34ee8de376713a7a30b7ec788be350fca8 100644 (file)
@@ -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);