From owner-freebsd-current@FreeBSD.ORG Fri Jul 20 03:02:41 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C809106564A for ; Fri, 20 Jul 2012 03:02:41 +0000 (UTC) (envelope-from erichfreebsdlist@ovitrap.com) Received: from alogreentechnologies.com (alogreentechnologies.com [67.212.224.110]) by mx1.freebsd.org (Postfix) with ESMTP id 31CC88FC1C for ; Fri, 20 Jul 2012 03:02:41 +0000 (UTC) Received: from amd620.ovitrap.com ([49.128.188.2]) (authenticated bits=0) by alogreentechnologies.com (8.13.1/8.13.1) with ESMTP id q6K32aAu031957 for ; Thu, 19 Jul 2012 21:02:38 -0600 From: Erich Dollansky To: freebsd-current@freebsd.org Date: Fri, 20 Jul 2012 10:04:59 +0700 User-Agent: KMail/1.13.7 (FreeBSD/8.3-STABLE; KDE/4.7.4; amd64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201207201004.59451.erichfreebsdlist@ovitrap.com> Subject: Script to monitor battery status on X220 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2012 03:02:41 -0000 Hi, I forget yesterday to share these two scripts: http://www.alogreentechnologies.com/freebsd/checkbattery checks the battery status of an X220 and shuts the machine down when the battery falls to 2% or below. The status is checked every minute. It calls the following script to shut the machine down: http://www.alogreentechnologies.com/freebsd/poweroff You must run the first script as root to enable it to power the machine off at the end. I found that the battery life of my machine was higher using a simple window manager like blackbox compared to things like GNOME or KDE. This might depend on the usage pattern. Erich