# Fluent Battery Indicators
Adds rich battery-status rows to the Quick Settings panel for connected peripheral devices, with a native look & feel.

## Disclaimer
This is part of a larger (personal) exercise for agentic AI usage, to increase personal side-project productivity & quality of life. This codebase was **largely** generated by the latest **Claude** as of writing. If you have any objection, kindly do not use this extension.

## Devices shown / hidden
| Shown                                      | Hidden                                                       |
| ------------------------------------------ | ------------------------------------------------------------ |
| Mouse, Keyboard, Touchpad, Pen             | Host battery — already shown by the shell's system indicator |
| Game controller                            | AC adapter / line power                                      |
| Headset, Headphones, Speakers, Other audio | Modem, Network, Video device                                 |
| Phone, Tablet, PDA, Computer               | Wearable, Toy                                                |
| Media player, Camera, Scanner, Printer     |                                                              |
| UPS                                        |                                                              |
| Bluetooth generic device                   |                                                              |

The "hidden" omissions mirror the device kinds that `gnome-settings-daemon/plugins/power/gsd-power-manager.c` intentionally skips when emitting low-battery notifications ("too uncommon, and name too imprecise").

## Installation
### Prerequisites
- Appropriate GNOME Shell Version (e.g. 49)
- UPower **1.x** (ships with any modern distro targeting GNOME 49)

### Manual install (recommended for development)

```bash
# 1. Copy the extension into the user extensions directory
mkdir -p ~/.local/share/gnome-shell/extensions
git clone 'git@github.com:gerelef/fluent-battery-indicators' /.local/share/gnome-shell/extensions/fluent-battery-indicators@gerelef.github.io
gnome-extensions enable fluent-battery-indicators@gerelef.github.io
```

### Via GNOME Extensions app

After copying the files above, open the **Extensions** app and toggle **Fluent Battery Indicators** on.

### Uninstall
```bash
gnome-extensions disable fluent-battery-indicators@gerelef.github.io
rm -rf ~/.local/share/gnome-shell/extensions/fluent-battery-indicators@gerelef.github.io
```

## Customisation

| What                          | Where                                     | Default                             |
| ----------------------------- | ----------------------------------------- | ----------------------------------- |
| Low-battery warning threshold | `LOW_BATTERY_THRESHOLD` in `extension.js` | `20` %                              |
| Which device kinds appear     | `PERIPHERAL_KINDS` Set in `extension.js`  | See table above                     |
| Device kind integer values    | `DeviceKind` / `DeviceState` objects      | Match `up-enums.h`                  |
| Visual styling                | `stylesheet.css`                          | Minimal overrides on shell defaults |

The CSS uses the shell's own `device-subtitle` class for status lines (the same
class the Bluetooth panel uses) so the extension inherits any theme that already
styles that class. Custom classes are prefixed `battery-device-*`.

## License
GPL-2.0-or-later (same as GNOME Shell itself).
