Support Multiple Batteries
Display status of the batteries per instance.
Out of the box the primary battery status will be displayed in the i3-bar. For some laptops that has multiple batteries e.g. ThinkPad, you want to have both batteries displayed. To do so, follow the steps:
- Stage your own i3 config file (tutorial), then open
~/.config/regolith/i3xrocks/conf.d/80_battery
in your editor of choice. - Find the line that pertains to the battery blocklet:
...
# Battery indicator
#
# Displays total percentage charge left of specified battery.
[battery]
interval=30
# instance=BAT0
- List all the battery instances running on your machine by running:
ls /sys/class/power_supply/
# AC BAT0 BAT1
- Update the staged config file to have a new blocklet as such:
...
# Battery indicator
#
# Displays total percentage charge left of specified battery.
[battery]
interval=30
instance=BAT0
[battery]
interval=30
instance=BAT1
Further Reading
See the reference page for configrations for more details about config files in Regolith.
Feedback
Was this page helpful?
Bonne nouvelle ! N'hésitez pas à nous dire quoi améliorer.
Mince alors ! N'hésitez pas à nous dire quoi améliorer.
Dernière modification May 27, 2020: French translation (#23) (bb78727a)