
The ThinkPad T480 has two battery modules — an internal one (BAT0) and an external one (BAT1) — but Waybar only shows one by default. Here’s how to display both.
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)
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,
},
},
Applying the changes
Waybar doesn’t auto-reload on config save. Restart it:
# On Omarchy:
omarchy-restart-waybar
# Or manually:
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.
Environment
- ThinkPad T480
- Arch Linux
- Hyprland (Omarchy)
- Waybar