Omahub
← All plugins
J

Charge Cap

by JustNak

Replaces the Omarchy battery widget with a 60 to 100% charge-limit slider for kernel charge thresholds.

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
de1f9e3
Scanned
2 days ago

No potentially dangerous behavior detected in the analyzed commit.

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

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

Low
AI risk level
Low
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
de1f9e3
Reviewed
2 days ago

Charge Cap is a battery-widget clone that writes the kernel charge-end threshold through asusctl, direct sysfs access, or pkexec. These writes only happen after the user explicitly drags the charge-limit slidercars and are restricted to a validated sysfs path with a 60-100% integer range, so the plugin is safe to publish and install.

  • The plugin can elevate to root via pkexec to write a sysfs node; the action is user-initiated and documented, but the sysfs path validation should remain intact.
  • No install-time scripts or hidden network/persistence behavior were found in the provided sample.
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/JustNak/Charge-Cap --enable
Hardware #bar #quickshell #power-management

Charge Cap

Charge Cap replaces the Omarchy battery widget with the same popover plus a CHARGE LIMIT slider. The slider writes the kernel charge end threshold.

Charge Cap on the Omarchy bar

Charge Cap panel

Install

If another clone of omarchy.power is already on the bar, such as zeusveilmon.power, disable or remove it first. Enable only replaces omarchy.power in place.

omarchy plugin add https://github.com/JustNak/Charge-Cap.git --enable

Click the battery button. CHARGE LIMIT sits above POWER PROFILE. Drag the slider and release to apply. Escape closes the popover.

Hardware

The slider is shown when the kernel exposes /sys/class/power_supply/BAT*/charge_control_end_threshold and Charge Cap can write it. Time to full is until that limit, not 100%.

Write order:

  1. asusctl battery limit N when /usr/bin/asusctl exists. No password prompt. ASUS machines with asusd take this path.
  2. A direct write to the sysfs node when the node is user-writable.
  3. pkexec /bin/sh writing that same node. Omarchy's polkit agent prompts once per change. ThinkPad, Framework, Dell, and other machines that only allow root to write the node take this path.

There is no slider when the kernel node is missing. Persistence is the kernel driver, not a file in this plugin. The control range is 60 to 100 percent.

Charge cycles

A firmware cycle_count above 0 is shown as an integer. A cycle_count of 0, or a missing cycle_count file, means the firmware did not report a counter. Charge Cap then estimates equivalent cycles as percentage points discharged, divided by 100.

The estimate is stored at $XDG_STATE_HOME/omarchy/justnak.charge-cap/cycles.json, or ~/.local/state/omarchy/justnak.charge-cap/cycles.json when XDG_STATE_HOME is unset.

Dips while UPower reports the pack charging or holding at the charge limit are not counted. The system battery is the first type=Battery supply that is not scope=Device.

Remove

omarchy plugin remove justnak.charge-cap --yes

Removal puts omarchy.power back in the same bar slot.

Check

omarchy plugin validate .
node test/model.js