--- wmbsdbatt.c.orig 2011-09-24 19:20:00.000000000 +0200 +++ wmbsdbatt.c 2011-09-24 19:20:23.000000000 +0200 @@ -79,7 +79,9 @@ static char *sysctl_battery_state = "hw.acpi.battery.state"; static char *sysctl_battery_life = "hw.acpi.battery.life"; static char *sysctl_battery_time = "hw.acpi.battery.time"; -static char *sysctl_temperature = "hw.acpi.thermal.tz0.temperature"; +static char *sysctl_temperature; +static char *sysctl_temperature_acpi = "hw.acpi.thermal.tz0.temperature"; +static char *sysctl_temperature_cpu0 = "dev.cpu.0.temperature"; static char *sysctl_acline = "hw.acpi.acline"; static char *sysctl_frequency = "dev.cpu.0.freq"; @@ -148,11 +150,17 @@ sa.sa_handler = SIG_IGN; sa.sa_flags = SA_NOCLDWAIT; - while ((ch = getopt(argc, argv, "bh")) != -1) { + + sysctl_temperature = sysctl_temperature_acpi; + + while ((ch = getopt(argc, argv, "bch")) != -1) { switch (ch) { case 'b': backlight = LIGHTON; break; + case 'c': + sysctl_temperature = sysctl_temperature_cpu0; + break; case 'h': usage(); break;