# Battery Charge Monitor Applet

Copyright © 2000 by James Cope

# Battery Charge Monitor Applet

`Battery Charge Monitor` applet, shown in Figure 1, displays the charge status of your portable computer battery. To learn how to add this applet to a Panel, right-click on the Panel and choose Panel->Add to panel->Applet->Monitors->Battery Charge Monitor.

| In order for `Battery Charge Monitor` to function correctly, your computer must have been configured to support Advanced Power Management.

Figure 1. Battery Charge Monitor

## Usage

`Battery Charge Monitor` just sits in your panel monitoring the status of your computer battery. By left-clicking on the applet you can toggle the view between Readout View and Graph View described in the Readout View and Graph View sections respectively.

### Readout View

Readout View, the default mode of view, displays the current battery status in an iconic and textual format. In this mode `Battery Charge Monitor` displays the following information:

Battery Icon

  The iconic representation of a battery on the left of the applet, shows how fully charged your battery is currently. The coloured area of the battery represents the ammount of charge left in your battery, with the top of the battery representing 100% charged.

  The colour of the battery changes when the charge drops below the current `Low Charge Threshold` (see Properties — General). The default colour of the battery is green in a normal state and red when it drops below the `Low Charge Threshold`.

  When your computer is attached to the power supply, a small lightning bolt appears on the battery representation to indicate that the battery is attached to the power supply and is in a charging state. An example of this is shown in Figure 2. You can also configure the battery to change colour when it is or isn't connected to the power supply, see Properties — Readout for further details on this feature.

  Figure 2. Battery Charge Monitor with the power supply connected

Percentage Remaining

  The percentage readout on the top right of the applet represents how fully charged your computer battery is currently.

Time Remaining

  The time remaining readout on the bottom right of the applet shows how much running time the battery has left. The time is shown in hours and minutes.

### Graph View

Graph View displays the percentage of charge remaining in your battery as a moving graph. The horizontal axis represents time and the vertical axis represents charge percentage with 100% charged being the top of the graph. By default the graph is green when your computer is connected to the power supply and blue when it isn't. The graph also changes colour when the charge drops below the `Low Charge Threshold` (see Properties — General) the default colour in this case is red.

Figure 3. Battery Charge Monitor in Graph View

## Right-Click Pop-Up Menu Items

In addition to the standard menu items, the right-click pop-up menu has the following item:

- Properties... — This menu item opens the Properties dialog (see Properties) which allows you to customize the appearance and behavior of this applet.

## Properties

You can configure `Battery Charge Monitor` applet by right-clicking on the applet and choosing the Properties... menu item. This will open the Properties dialog, with four groups of configurable items arranged in the following tabbed pages: General, Readout, Graph and Battery Charge Messages.

### Properties — General

Figure 4. Properties Dialogue — General

- `Follow Panel Size` — instructs `Battery Charge Monitor` to resize when the panel changes size. It is checked on by default. In order for `Applet Height` and `Applet Width` settings to take affect, it must be unchecked.

- `Applet Height & Applet Width` — these two spin buttons allow you to specify the dimensions of `Battery Charge Monitor` exactly in pixels. In order for these settings to take affect, `Follow Panel Size` must be unchecked. The default values are both set to 48.

  | Setting these values very small (below 28 pixels) results in the battery icon not being displayed due to lack of space.

- `Update Interval` — specifies in seconds how often `Battery Charge Monitor` refreshes the battery charge information it displays. The default setting is two seconds.

- `Low Charge Threshold` — is a percentage value of the battery charge that `Battery Charge Monitor` uses to optionally display a warning, it then considers the battery to have little power remaining. For example this information is used to decide when to change the colour of the battery icon in Readout View. The default value is 25.

- `Applet Mode` — the two Readout and Graph checkboxes are another way of toggling between Readout View and Graph View.

### Properties — Readout

The settings on this tab only affect `Battery Charge Monitor` when it is in Readout View.

All of the coloured rectangles on this tab can be left clicked on to display the GNOME colour wheel. This enables you to choose colours that you may prefer more than the defaults.

Figure 5. Properties Dialogue — Readout

- `AC-On Battery Color` — specifies the colour of the battery icon in Readout view when your computer is connected to the AC power supply. The default colour is green.

- `AC-Off Battery Color` — specifies the colour of the battery icon in Readout View when your computer is not connected to the AC power supply. The default colour is green.

- `Low Battery Color` — specifies the colour of the battery icon in Readout View when the charge percentage rate drops below the `Low Charge Threshold` (see Properties — General). The default colour is red.

### Properties — Graph

The settings on this tab only affect `Battery Charge Monitor` when it is in Graph View.

All of the coloured rectangles on this tab can be left clicked on to display the GNOME colour wheel. This enables you to choose colours that you may prefer more than the defaults.

Figure 6. Properties Dialogue — Graph

- `AC-On Battery Color` — specifies the colour of the graph when your computer is connected to the AC power supply. The default colour is green.

- `AC-Off Battery Color` —: specifies the colour of the graph when your computer is not connected to the AC power supply. The default colour is blue.

- `Graph Battery Low Color` — specifies the colour of the graph when the charge percentage rate drops below the `Low Charge Threshold`. The default colour is red.

- `Graph Tick Color` — specifies the colour of the graph division lines on the graph which mark the 25%, 50% and 75% charge points. The default colour is dark grey.

- `Graph Direction` — specifies which direction the graph moves over time. The default direction is `Right to Left`.

### Properties — Battery Charge Messages

Figure 7. Properties Dialogue — Battery Charge Messages

- `Warn in the battery charge dips below` — specifies the charge percentage at which `Battery Charge Monitor` shows a warning dialogue box that the battery is at a low charge. This warning is only displayed if `Enable Low Battery Warning` is checked. The default setting is 5%.

- `Enable Low Battery Warning` — specifies if `Battery Charge Monitor` should display a dialogue box warning that the battery charge has dropped below the charge percentage specified in the `Warn if the battery charge dips below` setting. The default value is checked.

- `Enable Full-Charge Notification` — specifies if `Battery Charge Monitor` should display a dialogue box when the battery has reached its 100% charged rate. The default value is unchecked.

## Known Bugs and Limitations

One oddity is if you start `Battery Charge Monitor` on a computer that has no Advanced Power Management support. This causes the `Low Battery Warning` dialogue box to be displayed which may be mis-leading.

## Authors

This applet was writen by Nat Friedman `<nat@nat.org>`. Please send all comments, suggestions, and bug reports to the GNOME bug tracking database. (Instructions for submitting bug reports can be found on-line. If you are using GNOME 1.1 or later, you can also use `Bug Report Tool` (bug-buddy), available in the Utilities submenu of Main Menu, for submitting bug reports.

The documentation for this applet which you are reading now was written by James Cope `<jcope@bcs.org.uk>`.. Please send all comments and suggestions regarding this manual to the GNOME Documentation Project by sending an email to `<docs@gnome.org>`. You can also submit comments online by using the GNOME Documentation Status Table.

## License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is included as an appendix to the GNOME Users Guide. You may also obtain a copy of the GNU General Public License from the Free Software Foundation by visiting their Web site or by writing to

Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307
USA