Omahub
← All plugins
O

Omarchy Power Manager

by OnlyVishesh

Advanced power management with hibernation support, configurable profiles, idle behavior, and lid actions

Security review

Potentially dangerous behavior detected · 5 findings

Deterministic scan — not a security guarantee

High
Risk level
High
Analyzed commit
767f8f1
Scanned
3 weeks ago
  • high permission_ownership extras/install.sh:27

    Recursively changes file ownership.

    chown -R root:root "$LIBEXEC_DIR"
  • high permission_ownership scripts/power-manager-backup:38

    Recursively changes file ownership.

    chown -R "$SUDO_USER" "$BACKUP_DIR" 2>/dev/null || true
  • Docs persistence CLAUDE.md:32

    Registers scheduled or boot-time system tasks.

    systemctl enable nvidia-suspend nvidia-hibernate nvidia-resume` via `pkexec`.
  • Docs persistence CLAUDE.md:23

    Writes to system scheduling or boot configuration.

    cat /etc/systemd/logind.conf.d/90-power-manager.conf`.
  • Docs external_hosts README.md:76

    Downloads or connects to an external HTTP(S) host.

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

Automated analysis only — not a security guarantee.

AI advisory review

Review recommended

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

Medium
AI risk level
Medium
Recommendation
review
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
767f8f1
Reviewed
3 weeks ago

The plugin requires root privileges for installation and operation, which is expected for power management tools, but the installer and scripts perform system-wide modifications (writing to /etc, enabling services) that could be risky if not carefully reviewed. The deterministic scan flagged high-risk operations like recursive chown and systemd service enabling, but these appear to be legitimate for the plugin's functionality. However, the installer copies scripts from the user-writable plugin directory to a root-owned location, and the scripts themselves are not obfuscated or malicious, but the broad system changes warrant caution.

  • Installer script (extras/install.sh) requires root and copies scripts from the plugin directory to /usr/local/libexec, then chowns them to root:root, which is a standard but privileged operation.
  • The plugin writes to /etc/systemd/logind.conf.d and /etc/systemd/sleep.conf.d, and enables NVIDIA suspend services, which are system-wide changes that could affect system behavior.
  • The power-manager-profile-switch script modifies the user's shell configuration (~/.config/omarchy/shell.json) when run as root, which could be unexpected.
  • The deterministic scan flagged recursive chown in power-manager-backup, but it is scoped to the backup directory and uses `|| true` to avoid errors.
  • The README documents a `git clone` command, but that is installation documentation, not part of the plugin's runtime code.
How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/onlyVishesh/omarchy-power-manager --enable
System #bar #power-management #system
<div align="center"> <h1>🔋 Omarchy Power Manager</h1> <p><b>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!</b></p> <p> <a href="https://github.com/basecamp/omarchy"><img src="https://img.shields.io/badge/OS-Omarchy-blue?style=flat-square&logo=linux" alt="Omarchy" /></a> <img src="https://img.shields.io/badge/Wayland-Hyprland-orange?style=flat-square&logo=wayland" alt="Wayland" /> <img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" alt="License" /> </p> </div> <p align="center"> <img src="assets/banner.png" alt="Omarchy Power Manager Banner" width="100%" /> </p>

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.

<p align="center"> <img src="assets/overview.png" width="700" alt="Overview Dashboard" /> </p>

⚡ 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.

<p align="center"> <img src="assets/profile.png" width="700" alt="Power Profiles" /> </p>

🛠️ 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.

<p align="center"> <img src="assets/advanced.png" width="700" alt="Advanced Settings" /> </p>

✨ 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

<div align="center"> <p>Built with ❤️ for the Omarchy Community.</p> </div>