Skip to content

amarqs182/battery-manager

Repository files navigation

Battery Manager

A GNOME Shell extension that replicates the macOS Sequoia battery management experience.

License GNOME Shell

Features

  • Panel Bar Indicator: macOS-style battery icon with a rounded highlight when the menu is open.
  • Frosted Glass Dropdown: A quick-access menu with:
    • Battery status (Percentage, Power Source, Time Estimate).
    • Energy Mode selection (Automatic, Low Power, and High Power) with custom Cairo-drawn icons.
    • "No Apps Using Significant Energy" status.
  • Usage History:
    • 24h/10d Battery Level chart.
    • 24h/10d Screen On Usage chart.
  • Comprehensive Settings:
    • Display off timers (Battery/Adapter).
    • Optimized Battery Charging and Battery Health data.
    • Wake for network access & Prevent sleep when plugged in.
  • Smart Scheduling: Set startup/wake and sleep/restart/shutdown times using systemd user timers.
  • Low Battery Notifications: Fire-once alerts when battery drops below 10%.

Installation

Dependencies

  • GNOME Shell 49 or 50.
  • UPower.
  • network-manager (for "Wake for network" features).

Steps

  1. Clone the repository:
    git clone https://github.com/amarqs182/battery-manager.git
  2. Move the folder to your extensions directory:
    mkdir -p ~/.local/share/gnome-shell/extensions/
    mv battery-manager ~/.local/share/gnome-shell/extensions/battery-manager@local
  3. Compile the settings schema:
    glib-compile-schemas ~/.local/share/gnome-shell/extensions/battery-manager@local/schemas/
  4. Restart GNOME Shell (Alt+F2, type r, Enter) or log out and log in.
  5. Enable the extension:
    gnome-extensions enable battery-manager@local

Development

The extension is modularly built:

  • lib/: D-Bus wrappers for UPower, PowerProfiles, and GSD Power.
  • ui/: Custom GTK4/Adwaita/Cairo components.
  • extension.js: Main lifecycle and signaling.
  • prefs.js: Preferences window entry point.

License

GPL-3.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors