openbsd-ports/sysutils/tpb/patches/patch-src_tpb_h
jcs cb9da7a10f when the laptop volume is muted, it's kind of hard to notice the
little flashing battery icon when the battery is about to die

so as long as we're talking to /dev/apm, store the battery level and
show when it changes ("Battery level changed to low")
2007-06-01 16:44:10 +00:00

21 lines
762 B
Plaintext

$OpenBSD: patch-src_tpb_h,v 1.2 2007/06/01 16:44:11 jcs Exp $
--- src/tpb.h.orig Mon Jul 18 08:15:59 2005
+++ src/tpb.h Thu May 31 20:04:13 2007
@@ -28,6 +28,8 @@
#define _(String) (String)
#endif /* ENABLE_NLS */
+#define PATH_NVRAM "/dev/nvram"
+
#define MAX_VOLUME 100
#define CALLBACK_CMD_LENGTH 256
#define CALLBACK_CMD_ARGS 30
@@ -68,6 +70,7 @@ typedef struct {
unsigned int volume_toggle; /* volume toggle */
unsigned int mute_toggle; /* mute toggle */
unsigned int ac_state; /* ac connected */
+ unsigned int battery_level; /* battery level */
unsigned int powermgt_ac; /* power management mode ac */
unsigned int powermgt_battery; /* power management mode battery */
} t_thinkpad_state;