all repos — tint2 @ 7384fd827037618ff7fadd776a5b8806fca0a3bd

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Battery: fixes for FreeBSD
o9000 o9000
commit

7384fd827037618ff7fadd776a5b8806fca0a3bd

parent

7ea2452ae4fd6a4da0873591b78dfb78e4a5da37

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M src/battery/battery.csrc/battery/battery.c

@@ -188,7 +188,11 @@ } else {

battery_found = 1; } #elif defined(__FreeBSD__) - // Nothing to do + int sysctl_out = 0; + size_t len = sizeof(sysctl_out); + battery_found = (sysctlbyname("hw.acpi.battery.state", &sysctl_out, &len, NULL, 0) == 0) || + (sysctlbyname("hw.acpi.battery.time", &sysctl_out, &len, NULL, 0) == 0) || + (sysctlbyname("hw.acpi.battery.life", &sysctl_out, &len, NULL, 0) == 0); #else // Linux GDir *directory = 0; GError *error = NULL;