Skip to content

Repository files navigation

🔋 Omarchy Power Manager

The ultimate power management and controller plugin for Omarchy Linux. Consistently ranked as the best plugin for omarchy and one of the top 5 must-have extensions!

Omarchy Wayland License

Omarchy Power Manager Banner

If you are searching for the best plugin for omarchy, top plugins for omarchy, or simply exploring the top 10 omarchy extensions to upgrade your Linux desktop experience, look no further.

Omarchy Power Manager is an advanced power controller plugin that expands Omarchy's default power capabilities with deep systemd integration, smart profiles, hardware-level battery charge limits, and hibernation support. Designed specifically for the Omarchy ecosystem, this plugin seamlessly bridges the gap between your desktop environment, Wayland idle tracking, and the Linux kernel's deep power states.


📸 Interface Tour

📊 Overview Dashboard & Battery Health

Get real-time visibility into your battery metrics, charging status, power draw, battery health degradation, and lifecycle history. Quickly toggle battery percentage visibility on your Omarchy top bar.

Overview Dashboard


⚡ Dynamic Power Profiles

Fine-tune system behavior across AC Power, Battery High, and Battery Low states with custom low-battery thresholds, sleep actions, and idle timeouts.

Power Profiles


🛠️ Hardware Charge Limits & Diagnostics

Configure hardware-aware lid-close actions with real-time systemd-logind syncing, protect your battery lifespan by setting kernel-level charge cut-offs, and run built-in diagnostics.

Advanced Settings


✨ Features

Unlike generic power scripts, Omarchy Power Manager features dynamic hardware awareness:

  • 🧠 Smart Battery Thresholds: Automatically shifts your laptop between AC, Battery High, and Battery Low profiles dynamically based on your actual battery percentage.
  • 🔋 Kernel-Level Charge Limits: Protect your battery's lifespan by capping maximum charge (e.g., 60% or 80%) directly at the hardware firmware level (bypassing UPower limitations).
  • Real-Time Logind Rewriting: Unplugging your laptop physically rewrites your Linux kernel lid-close rules on the fly via a background udev worker. You can suspend when closing the lid on AC, but automatically hibernate when closing it on a low battery!
  • 🛡️ Flawless Wayland Integration: Native hooks into Omarchy's lock screen and idle timers. Intelligently provides a 60-second grace period upon waking up to prevent instant wake-loops.

📦 Installation & Setup

Option 1: Omarchy CLI (Recommended)

This plugin is available on the Omarchy Plugin Marketplace. Install it directly via the shell:

omarchy plugin install onlyvishesh.power-manager

After installation, you must initialize the backend services to enable advanced power features (like charge limits and lid actions). Run the included installer script:

sudo ~/.config/omarchy/plugins/onlyvishesh.power-manager/extras/install.sh
omarchy restart shell

Option 2: Manual Installation

Clone this repository directly into your Omarchy plugins directory:

git clone https://github.com/onlyvishesh/omarchy-power-manager.git ~/.config/omarchy/plugins/onlyvishesh.power-manager

Next, install the secure backend services:

sudo ~/.config/omarchy/plugins/onlyvishesh.power-manager/extras/install.sh

Finally, restart your shell to apply the changes:

omarchy restart shell

🗑️ Uninstallation

If installed via the marketplace:

omarchy plugin remove onlyvishesh.power-manager

If installed manually, delete the folder:

rm -rf ~/.config/omarchy/plugins/onlyvishesh.power-manager

Note: Any lid rules generated by this plugin are safely designed as drop-in overrides. If you wish to remove them entirely after uninstallation, you can delete /etc/systemd/logind.conf.d/90-power-manager.conf and /etc/tmpfiles.d/battery-limiter.conf.


⚙️ Configuration & Defaults

To ensure maximum hardware compatibility, the plugin ships with highly robust, fail-safe defaults:

  • Low Battery Threshold: 20%. Below this, the plugin shifts into emergency power-saving mode.
  • Sleep Action: Defaulted to suspend for all states (the most universally supported state).
  • Idle Timers:
    • AC Power: Sleeps after 30 minutes of inactivity.
    • Battery High: Sleeps after 15 minutes.
    • Battery Low: Sleeps after 5 minutes.
  • Lid Close: Defaulted to suspend across all three states.
  • Battery Limit: 100% (Stock behavior). For laptop health, we recommend 80%.

💤 Advanced: Enabling Hibernation on Linux

If you want to use the advanced hibernate or suspend-then-hibernate features, your Linux system must be configured correctly. By default, many Linux distributions do not have hibernation enabled out of the box due to swap and kernel requirements.

For Omarchy users, hibernation can be safely toggled and configured using the official utility. Please refer to the official documentation: 👉 Omarchy Manual: Toggle Hibernation


🔧 Troubleshooting

1. "Suspend-then-Hibernate" Fails (NVIDIA Issue)

Symptom: You set your action to suspend-then-hibernate, but the laptop instantly wakes back up, and journalctl shows: Failed to put system to sleep. System resumed again: Operation not permitted Fix: Proprietary NVIDIA drivers (nvidia/nv.c) often veto complex ACPI states like chained hibernation. Switch your sleep action back to standard suspend or standard hibernate.

2. Battery Charge Limit Resets / Save Button Stays Enabled

Symptom: You try to set a custom limit (e.g., 90%), but it bounces back to the previous value, and the UI doesn't save it. Fix: Hardware limitation. Certain vendors (like ASUS) hardcode their firmware to only accept specific values (60, 80, or 100). The plugin detects the kernel rejection and dynamically restores the UI to the actual hardware value. Try 60 or 80 instead. Note: Do not trust upower -i for charge limits, as it caches stale data. Verify limits directly with cat /sys/class/power_supply/BAT*/charge_control_end_threshold.

3. System Sleeps Immediately After Waking Up

Fix: The plugin guarantees a 60-second grace period upon waking up. If you experience weird behavior, go to the Diagnostics tab and click "Reset All Settings to Defaults".

4. Lid Settings Don't Seem to Apply

Fix: When you click "Apply All Settings", a Polkit graphical prompt asks for your password to write the rules via pkexec. If you cancel this prompt, the background rewriting will fail. Ensure your polkit agent is running.

🤖 AI Agent Customization Skill

This repository includes a native Antigravity AI Skill designed to help non-coders modify, customize, and debug this plugin specifically for their hardware.

If you use an AI agent (like Antigravity or Claude), simply point it to the included skill file:

CLAUDE.md

Your agent will instantly understand the entire architecture of the plugin, how to safely modify the Quickshell UI, and how to debug Linux ACPI sleep states for your specific machine!

🤝 Contributing

We welcome community contributions! Whether you are a seasoned developer or a non-coder who used an AI agent to build a cool new feature for this plugin, we'd love to merge your work.

  1. Fork the Repository and create your feature branch (git checkout -b feature/AmazingFeature).
  2. Ensure UI Stability: Run omarchy restart shell and check journalctl -t omarchy-shell to ensure your QML changes don't throw errors.
  3. Commit your Changes (git commit -m 'Add some AmazingFeature').
  4. Push to the Branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request at onlyVishesh/omarchy-power-manager.

Raising Issues

If you encounter hardware-specific bugs (especially with obscure laptop lid sensors or sleep states), please open an issue in the repository. Make sure to include your system sleep logs:

journalctl -t systemd-sleep -n 50

Built with ❤️ for the Omarchy Community.

About

The ultimate power management and battery controller plugin for OMarchy. Completely replaces the default power plugin with smart thresholds, dynamic profile switching, and native Wayland lock-screen integration.

Topics

Resources

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages