i3 #
NOTICE: This page was copied from the Regolith 1.x website and has not been updated for Regolith 2. It may contain out of date information.
Out of the box the primary battery status will be displayed in the i3-bar. For some laptops that have multiple batteries, e.g. ThinkPads, you want to have both batteries displayed:
- Stage your i3xrocks configuration files, then open
~/.config/regolith3/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
Sway #
- Stage your i3status-rust config file:
cp /etc/regolith/i3status-rust/config.toml ~/.config/regolith3/i3status-rust/config.toml
- Configure to supply i3status-rust with your config file:
echo "wm.bar.status_config: ~/.config/regolith3/i3status-rust/config.toml" >> ~/.config/regolith3/Xresources
- 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 contain blocks for both of the batteries:
[[block]]
block = "battery"
interval = 10
[...]
device = "BAT0"
[[block]]
block = "battery"
interval = 10
[...]
device = "BAT1"
Further Reading #
See the reference page for configurations for more details about config files in Regolith.