ironbar: Add battery indicator support with upower

It turns out that I'd rather have a battery indicator than having to
`cat /sys/class/power_supply/BAT0/capacity` all the time.

Depends on upower and results in the battery indicator always being
shown even when virtualized.
This commit is contained in:
Donovan Glover 2024-05-13 11:04:41 -04:00
parent c193b2b2cf
commit 08cc18133d
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 14 additions and 0 deletions

View File

@ -58,6 +58,9 @@ in
on_click_right = "~/.config/hypr/lower-volume.fish";
mode = "watch";
}
{
type = "upower";
}
{
type = "clock";
format = "%x%a%R";
@ -95,6 +98,16 @@ in
padding-right: 0.5em;
}
.upower {
padding-left: 0.2em;
padding-right: 0.2em;
}
.upower .label {
padding-left: 0;
padding-right: 0;
}
.popup {
border: 1px solid #${base01};
padding: 1em;

View File

@ -106,6 +106,7 @@ in
tumbler.enable = true;
gvfs.enable = true;
gnome.gnome-keyring.enable = true;
upower.enable = true;
};
environment.systemPackages = mkMerge [