
The ThinkPad T480 carries two battery modules — an internal BAT0 and a removable external BAT1 — but the Omarchy bar shows a single number by default. Worse, that number hides exactly what matters. The internal pack can sit at 5% while the bay battery is at 67%, and the bar just says 44%.
This post covers both eras of Omarchy. On 4.0+, install the plugin and you are done. Still on 3.x with Waybar? The old config is still here. And if you want to know why this is not the default, there is the part underneath.
Identifying the batteries
First, confirm which batteries the system recognizes:
ls /sys/class/power_supply/
On the T480 the output should be:
AC BAT0 BAT1
BAT0— internal batteryBAT1— external battery (removable)
Omarchy 4.0: install the plugin
Omarchy 4.0 (“quattro”) replaced Waybar with a Quickshell-based shell (omarchy-shell) — bar, notifications, panels and OSD all moved into a single QML process. ~/.config/waybar/ is no longer read, and the migration archives the old config:
ls -d ~/.config/waybar.omarchy-upgrade-to-quattro.*.bak
I packaged the fix as a plugin, so there is no QML to edit by hand:
omarchy plugin add https://github.com/cinco/omarchy-batteries.git --enable
omarchy restart shell
That is the whole install. The manifest declares omarchy.clonedFrom: "omarchy.power", so enabling the plugin takes the built-in power widget’s slot and disables it — no manual swap, and whatever showPercentage you had set carries over. The two are mutually exclusive by construction: following this path cannot leave you with two battery widgets on the bar.
On the bar:
5% 67%
And in the panel, the aggregate summary on top with a block per pack underneath:
BATTERIES
BAT0 5%
Size 20Wh State Holding
Cycles 588 Draw 0W
Health 82% Charge limit 75-100%
BAT1 67%
Size 34Wh Time left 2h 2m
Cycles 84 Discharging 11.2W
Health 70% Charge limit 75-100%
At a glance: the internal pack has 588 cycles and 82% health against 84 cycles and 70% for the external one — and only BAT1 is delivering current. Charge limit comes straight from sysfs, so it reflects whatever TLP applied without running tlp-stat.
Right-click toggles between percentages and icons only. SUPER + CTRL + P still opens the panel and the menu’s Battery Percentage item still works — the plugin answers on both IPC targets.
To uninstall:
omarchy plugin remove cinco.batteries
omarchy restart shell
Removal puts omarchy.power back on its own, for the same reason installing displaced it.
This works on any laptop with two or more packs, not just the T480. With a single battery it behaves exactly like the original widget.
Omarchy 3.x: Waybar configuration

Waybar supports multiple instances of the same module using the #name suffix. Just add battery#bat2 to the bar and configure each instance with its respective bat.
In ~/.config/waybar/config.jsonc, add battery#bat2 to modules-right:
"modules-right": [
// ...other modules...
"battery",
"battery#bat2",
],
Then configure both modules:
"battery": {
"bat": "BAT0",
"format": "{capacity}% {icon}",
"format-discharging": "{icon}",
"format-charging": "{icon}",
"format-plugged": "",
"format-icons": {
"charging": ["", "", "", "", "", "", "", "", "", ""],
"default": ["", "", "", "", "", "", "", "", "", ""],
},
"format-full": "",
"tooltip-format-discharging": "{power:>1.0f}W↓ {capacity}%",
"tooltip-format-charging": "{power:>1.0f}W↑ {capacity}%",
"interval": 5,
"states": {
"warning": 20,
"critical": 10,
},
},
"battery#bat2": {
"bat": "BAT1",
"format": "{capacity}% {icon}",
"format-discharging": "{icon}",
"format-charging": "{icon}",
"format-plugged": "",
"format-icons": {
"charging": ["", "", "", "", "", "", "", "", "", ""],
"default": ["", "", "", "", "", "", "", "", "", ""],
},
"format-full": "",
"tooltip-format-discharging": "{power:>1.0f}W↓ {capacity}%",
"tooltip-format-charging": "{power:>1.0f}W↑ {capacity}%",
"interval": 5,
"states": {
"warning": 20,
"critical": 10,
},
},
Waybar doesn’t auto-reload on config save. Restart it:
omarchy-restart-waybar
# or: killall waybar && waybar &
Context
This fix came from Omarchy issue #655, where the default config pointed to BAT1 and BAT2 — names that don’t exist on the T480. The actual batteries are BAT0 and BAT1.
Under the hood
The rest of this post is the long way round: why the stock widget shows a single number, and how the plugin fixes it. Useful if you want to adapt it, contribute, or just understand what is running.
Why the stock widget shows one number
The power widget (omarchy.power) reads UPower.displayDevice, the aggregate across every battery, and its manifest carries:
"barWidget": {
"allowMultiple": false
}
So there is no way to put two instances on the bar, and no way to point an instance at a specific BAT through shell.json. Unlike Waybar, there is no bat option here.
The way out is to start from the existing widget. Omarchy ships a command for exactly that — it copies the first-party plugin into your config and switches the bar over to the copy:
omarchy plugin clone omarchy.power
# Cloned omarchy.power to ~/.config/omarchy/plugins/<user>.power and switched to <user>.power
That is how cinco.batteries started. If you only want to use it, the omarchy plugin add above already gives you the result — the clone here is for people who want to tinker.
Seeing the individual batteries
UPower exposes each pack separately — the widget simply wasn’t using them:
$ upower -e
/org/freedesktop/UPower/devices/battery_BAT0
/org/freedesktop/UPower/devices/battery_BAT1
/org/freedesktop/UPower/devices/line_power_AC
/org/freedesktop/UPower/devices/DisplayDevice
In QML that is UPower.devices.values. Panel.qml builds the list of physical packs right after batteryPresent:
// The physical packs, sorted by sysfs name (BAT0 internal, BAT1 bay on a
// ThinkPad Power Bridge). UPower.displayDevice is the composite and is
// excluded so it cannot show up twice.
readonly property var batteries: {
var model = UPower.devices
var all = model && model.values ? model.values : []
var out = []
for (var i = 0; i < all.length; i++) {
var d = all[i]
if (!d || d === UPower.displayDevice) continue
if (!d.isPresent || !d.isLaptopBattery) continue
out.push(d)
}
out.sort(function(a, b) { return String(a.nativePath).localeCompare(String(b.nativePath)) })
return out
}
readonly property bool multiBattery: batteries.length > 1
In Model.js, a helper that draws one pack. This part matters: the original batteryIcon() picks between charging and discharging icons from the global AC flag. On a Power Bridge machine only one battery moves current at a time, so the idle one would be painted as if it were charging. Here the state comes from the device itself:
function batteryLabel(device) {
var d = device || {}
var name = String(d.nativePath || "").split("/").pop()
return name || String(d.model || "Battery")
}
function devicePercentage(device) {
return Math.round(batteryFraction(device) * 100)
}
// Per-device icon. Unlike batteryIcon() this keys off the device's own state
// rather than the global on-AC flag, so an idle pack on a Power Bridge laptop
// does not get painted as if it were charging.
function deviceIcon(device, states) {
var d = device || {}
if (!d.isPresent) return ""
var index = Math.max(0, Math.min(9, Math.floor(batteryFraction(d) * 10)))
var s = states || {}
if (d.state === s.FullyCharged) return CHARGING_ICONS[9]
if (d.state === s.Charging) return CHARGING_ICONS[index]
return DEFAULT_ICONS[index]
}
(CHARGING_ICONS and DEFAULT_ICONS are the same arrays that already live inside batteryIcon() — worth hoisting to module scope rather than duplicating.)
Finally, the bar button renders every pack:
BarIconButton {
id: button
text: {
if (root.multiBattery && !vertical) {
var packs = root.batteries
var parts = []
for (var i = 0; i < packs.length; i++) {
var icon = root.deviceIcon(packs[i])
parts.push(root.showPercentage ? root.devicePercentage(packs[i]) + "% " + icon : icon)
}
return parts.join(" ")
}
return root.showPercentage && !vertical
? Math.round(root.batteryFraction * 100) + "% " + root.batteryIcon()
: root.batteryIcon()
}
slotSize: {
var packs = root.multiBattery && !vertical ? root.batteries.length : 1
return Style.bar.iconSlot * packs * (root.showPercentage && !vertical ? 2 : 1)
}
// ...rest unchanged
}
slotSize has to follow, otherwise the fixed slot width clips the second readout.
The panel read only the first battery too
With the panel open you could see 5% in the header next to a half-full progress bar. The culprit is omarchy-battery-status:
battery=$(upower -e 2>/dev/null | grep BAT | head -n 1)
head -n 1 — always BAT0. So percentage, Wh, watts and time remaining all described the internal battery alone, while the icon and the progress bar came from the UPower aggregate. On a T480 with the internal pack nearly empty, the panel claimed 5% on a machine with over two hours of runtime.
DisplayDevice already has all of it, so QML can read it directly instead of leaning on the script:
readonly property string aggregatePercentage: Math.round(batteryFraction * 100) + "%"
readonly property string aggregateSize: {
var d = UPower.displayDevice
var wh = d && d.isPresent ? Number(d.energyCapacity || 0) : 0
return wh > 0 ? Math.round(wh) + "Wh" : ""
}
readonly property string aggregateRate: {
var d = UPower.displayDevice
if (!d || !d.isPresent) return ""
return (Math.round(Math.abs(Number(d.changeRate || 0)) * 10) / 10) + "W"
}
readonly property string aggregateTime: {
var d = UPower.displayDevice
if (!d || !d.isPresent) return ""
return formatDuration(root.discharging ? d.timeToEmpty : d.timeToFull)
}
Then it is a matter of using those whenever multiBattery holds, falling back to the script for single-battery laptops. The difference in the header:
| Field | Before (BAT0 only) | After (aggregate) |
|---|---|---|
| Percentage | 5% | 44% |
| Battery size | 19Wh | 54Wh |
| Time left | — | 2h 8m |
| Discharging | 0W | 11.2W |
Per-battery statistics
A corrected header fixes the total, but on a Power Bridge machine what matters is where the energy is. That needs size, cycles, time left and draw per pack — and there it hits a wall: Quickshell’s UPowerDevice API exposes percentage, state, energyCapacity, changeRate, timeToEmpty and timeToFull, but not cycle count, design capacity or charge thresholds.
Those three live in sysfs. The plugin covers them with a small helper next to the QML, battery-packs:
#!/bin/bash
# Emits one TSV row per present battery:
# name <TAB> cycles <TAB> design_wh <TAB> full_wh <TAB> start_thresh <TAB> end_thresh
#
# These are the per-pack values Quickshell's UPower API does not expose. Live
# values (percentage, state, rate, time) come from UPower directly, so this only
# has to cover the slow-changing metadata.
#
# Missing fields are emitted as "-" so the column count stays fixed.
power_supply_path="${OMARCHY_POWER_SUPPLY_PATH:-/sys/class/power_supply}"
read_or_dash() {
[[ -r $1 ]] && cat "$1" 2>/dev/null || echo "-"
}
for battery in "$power_supply_path"/*; do
[[ -r $battery/type ]] || continue
[[ $(<"$battery/type") == "Battery" ]] || continue
[[ -r $battery/present && $(<"$battery/present") == "1" ]] || continue
name=${battery##*/}
cycles=$(read_or_dash "$battery/cycle_count")
# A pack that never reports cycles reads 0; that is "unknown", not "brand new".
[[ $cycles == "0" ]] && cycles="-"
design="-"
full="-"
if [[ -r $battery/energy_full_design && -r $battery/energy_full ]]; then
design=$(awk -v v="$(<"$battery/energy_full_design")" 'BEGIN { printf "%.2f", v / 1000000 }')
full=$(awk -v v="$(<"$battery/energy_full")" 'BEGIN { printf "%.2f", v / 1000000 }')
elif [[ -r $battery/charge_full_design && -r $battery/charge_full && -r $battery/voltage_min_design ]]; then
# Packs that report charge (µAh) instead of energy (µWh) need the design
# voltage to reach watt-hours.
millivolts=$(<"$battery/voltage_min_design")
design=$(awk -v v="$(<"$battery/charge_full_design")" -v mv="$millivolts" 'BEGIN { printf "%.2f", v * mv / 1000000000000 }')
full=$(awk -v v="$(<"$battery/charge_full")" -v mv="$millivolts" 'BEGIN { printf "%.2f", v * mv / 1000000000000 }')
fi
start=$(read_or_dash "$battery/charge_control_start_threshold")
stop=$(read_or_dash "$battery/charge_control_end_threshold")
printf '%s\t%s\t%s\t%s\t%s\t%s\n' "$name" "$cycles" "$design" "$full" "$start" "$stop"
done
$ ~/.config/omarchy/plugins/cinco.batteries/battery-packs
BAT0 588 24.00 19.76 75 100
BAT1 84 48.84 34.09 75 100
The split of work: UPower for anything that changes constantly (percentage, state, watts, time remaining — reactive, no polling) and sysfs for what barely changes (cycles, design capacity, thresholds — read on the same 5-second refresh the panel already runs while open).
In QML the Process points at the script through the plugin’s own relative path:
Process {
id: packsProc
command: [String(Qt.resolvedUrl("battery-packs")).replace(/^file:\/\//, "")]
stdout: StdioCollector { waitForEnd: true; onStreamFinished: root.updatePackMeta(text) }
}
And the helpers merge both sources:
function packSize(device) {
var wh = Number((device && device.energyCapacity) || 0)
if (wh <= 0) wh = Number(packInfo(device).full || 0)
return wh > 0 ? Math.round(wh) + "Wh" : "—"
}
function packCycles(device) {
var cycles = packInfo(device).cycles
return cycles ? String(cycles) : "—"
}
function packHealth(device) {
var info = packInfo(device)
var full = Number(info.full || (device && device.energyCapacity) || 0)
var design = Number(info.design || 0)
if (full <= 0 || design <= 0) return "—"
return Math.round((full / design) * 100) + "%"
}
function packIdle(device) {
var d = device || {}
return Math.abs(Number(d.changeRate || 0)) <= 0.05
}
function packFlowLabel(device) {
var d = device || {}
var states = upowerStates()
if (packIdle(d)) return "State"
if (d.state === states.Discharging) return "Time left"
if (d.state === states.Charging) return "Time to full"
return "Draw"
}
function packFlowValue(device) {
var d = device || {}
var states = upowerStates()
if (packIdle(d)) {
if (d.state === states.FullyCharged) return "Full"
if (d.state === states.PendingCharge) return "Holding"
return "Idle"
}
var time = ""
if (d.state === states.Discharging) time = formatDuration(d.timeToEmpty)
else if (d.state === states.Charging) time = formatDuration(d.timeToFull)
return time || packRate(d)
}
packIdle matters more than it looks: BAT0 sits in pending-charge at 0W while BAT1 drains. Without that handling the panel would promise a “time to full” for a battery doing nothing at all. With it, you get State: Holding.
A Repeater over root.batteries renders one block per pack, using the same two-column pairing the header already uses.
Since cycles moved to the per-pack block, the header swaps that field for aggregate Health — weighted by design capacity, not a flat average:
// Health across every pack, weighted by design capacity rather than averaged.
readonly property string aggregateHealth: {
var full = 0
var design = 0
var packs = batteries
for (var i = 0; i < packs.length; i++) {
var info = packInfo(packs[i])
full += Number(info.full || packs[i].energyCapacity || 0)
design += Number(info.design || 0)
}
return design > 0 && full > 0 ? Math.round((full / design) * 100) + "%" : "—"
}
Why 44% when one is at 67% and the other at 5%?
Because the UPower aggregate is not an average of percentages — it sums watt-hours:
current energy full capacity
BAT0 0.99 Wh / 19.76 Wh = 5%
BAT1 22.84 Wh / 34.09 Wh = 67%
────────── ──────────
total 23.83 Wh / 53.85 Wh = 44%
The naive average would be (5 + 67) / 2 = 36%. The real number is higher because BAT1 is nearly twice the size of BAT0 and accounts for 63% of the laptop’s total capacity on its own:
0.05 × 0.367 + 0.67 × 0.633 = 44%
BAT0 BAT1
What fools the intuition: 5% of BAT0 is only 0.99 Wh — about 5 minutes at an 11W draw. It looks dramatic next to 67%, but it barely moves the needle. BAT1’s 67%, meanwhile, is 22.84 Wh, essentially all the runtime you have. That is why the aggregate is the right number for the header, and the per-pack block is what tells you where that energy sits.
Worth remembering that these percentages are already relative to degraded capacity, not factory capacity — which is exactly what each pack’s Health line reports.
Development loop
Files under ~/.config/omarchy/plugins/ hot-reload on save, but new properties on an already-loaded plugin sometimes need a full cycle:
omarchy plugin validate ~/.config/omarchy/plugins/cinco.batteries
omarchy restart shell
validate runs the same checks the shell applies at load time — schema, relative entry points that exist, an id outside the reserved namespace, no symlinks — so it catches the mistake before it becomes a widget that installs and never appears.
Runtime QML errors land in the user journal:
journalctl --user --since "-2min" | grep -i qml
One warning that is not a problem: Handler was registered but will not be used because another handler is registered for target .... It shows up for every Omarchy panel, first-party ones included — the shell instantiates each panel more than once and the second one warns. Test IPC by behaviour rather than trusting that log.
The fork caveat
The plugin is a fork of omarchy.power’s Panel.qml, so upstream improvements to the power panel do not arrive automatically. It is stated in the README, and it is the reason I packaged this as a plugin instead of leaving it as a clone recipe: that way the drift is my maintenance problem, not yours.
Code at github.com/cinco/omarchy-batteries, MIT, derived from Omarchy (Basecamp, MIT).
Environment
- ThinkPad T480 (two batteries, Power Bridge)
- Arch Linux
- Omarchy 4.0.0 (Hyprland)
- Quickshell 0.3.0
- Waybar (Omarchy 3.x, historical section)