~ubuntu-branches/ubuntu/karmic/emacs-snapshot/karmic

« back to all changes in this revision

Viewing changes to lisp/battery.el

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-04-05 09:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090405091430-nw07lynn2arotjbe
Tags: upstream-20090320
Import upstream version 20090320

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; battery.el --- display battery status information  -*- coding: iso-8859-1 -*-
2
2
 
3
3
;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004,
4
 
;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
4
;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
5
 
6
6
;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org>
7
7
;; Keywords: hardware
60
60
         'battery-pmset)
61
61
        ((eq system-type 'windows-nt)
62
62
         'w32-battery-status))
63
 
  "*Function for getting battery status information.
 
63
  "Function for getting battery status information.
64
64
The function has to return an alist of conversion definitions.
65
65
Its cons cells are of the form
66
66
 
80
80
         "%L power, battery %B (%p%% load, remaining time %t)")
81
81
        (battery-status-function
82
82
         "Power %L, battery %B (%p%% load, remaining time %t)"))
83
 
  "*Control string formatting the string to display in the echo area.
 
83
  "Control string formatting the string to display in the echo area.
84
84
Ordinary characters in the control string are printed as-is, while
85
85
conversion specifications introduced by a `%' character in the control
86
86
string are substituted as defined by the current value of the variable
108
108
         "[%b%p%%,%d�C]")
109
109
        (battery-status-function
110
110
         "[%b%p%%]"))
111
 
  "*Control string formatting the string to display in the mode line.
 
111
  "Control string formatting the string to display in the mode line.
112
112
Ordinary characters in the control string are printed as-is, while
113
113
conversion specifications introduced by a `%' character in the control
114
114
string are substituted as defined by the current value of the variable
128
128
  :group 'battery)
129
129
 
130
130
(defcustom battery-update-interval 60
131
 
  "*Seconds after which the battery status will be updated."
 
131
  "Seconds after which the battery status will be updated."
132
132
  :type 'integer
133
133
  :group 'battery)
134
134
 
135
135
(defcustom battery-load-low 25
136
 
  "*Upper bound of low battery load percentage.
 
136
  "Upper bound of low battery load percentage.
137
137
A battery load percentage below this number is considered low."
138
138
  :type 'integer
139
139
  :group 'battery)
140
140
 
141
141
(defcustom battery-load-critical 10
142
 
  "*Upper bound of critical battery load percentage.
 
142
  "Upper bound of critical battery load percentage.
143
143
A battery load percentage below this number is considered critical."
144
144
  :type 'integer
145
145
  :group 'battery)