ironbar: Add dynamic battery

This commit is contained in:
DashieTM 2024-04-24 11:11:05 +02:00
parent 84356a8885
commit fe167fd072
6 changed files with 15 additions and 5 deletions

View file

@ -23,6 +23,7 @@
morewaita-icon-theme
kdePackages.breeze-icons
gnome.seahorse
upower
];
gtk.iconCache.enable = false;
@ -42,6 +43,7 @@
'';
programs.dconf.enable = true;
services.upower.enable = true;
services.printing.enable = true;
services.dbus.enable = true;
services.dbus.packages = with pkgs; [

View file

@ -37,7 +37,7 @@
# because allowing rust nightly is too hard by default....
(import (fetchTarball {
url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
sha256 = "sha256:02p0zzglgi3980iyam46wv8ajr83wj6myjhrjjfv96vkafl6pycg";
sha256 = "sha256:1aaza47rqi74ypi77ksz396q9l7rrxfrdnhi2pfjb0yqmz7l69wl";
}))
];
};
@ -55,7 +55,7 @@
};
modules = [
./hardware/marmo/default.nix
];
] ++ base_imports;
};
nixosConfigurations."overheating" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
@ -64,7 +64,7 @@
};
modules = [
./hardware/overheating/default.nix
];
] ++ base_imports;
};
nixosConfigurations."spaceship" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {

View file

@ -10,4 +10,7 @@
",highrr,auto,1"
];
programs.ironbar.monitor = "eDP-1";
programs.ironbar.battery = [
{ type = "upower"; class = "memory-usage"; }
];
}

View file

@ -8,5 +8,10 @@
Extra settings for foo.
'';
};
battery = lib.mkOption {
default = [];
example = [];
};
};
}

View file

@ -142,7 +142,7 @@
];
config = {
monitors."${config.programs.ironbar.monitor}" = {
end = [
end = config.programs.ironbar.battery ++ [
{
type = "sys_info";
format = [