forgot about da battery :-P

This commit is contained in:
krizej 2024-08-04 00:38:28 +02:00
parent c890911af4
commit 18c8f8769e
2 changed files with 22 additions and 5 deletions

View file

@ -51,13 +51,17 @@
documentation.enable = true;
theme.enable = true;
printing.enable = true;
i3.enable = true;
xserver = {
enable = true;
libinput = true;
};
i3 = {
enable = true;
battery = true;
};
gaming = {
enable = true;
homm3 = true;

View file

@ -1,5 +1,5 @@
{ lib, pkgs, config, ...}: let
inherit (lib) mkIf mkEnableOption mkOption types optionals;
inherit (lib) mkIf mkEnableOption mkOption types optionals mergeAttrs optionalAttrs;
cfg = config.chuj.stuff.i3;
user = config.chuj.system.user;
in {
@ -24,6 +24,7 @@ in {
};
default = {};
};
battery = mkEnableOption "battery";
};
config = let
@ -205,7 +206,7 @@ in {
output_format = "i3bar";
};
modules = {
modules = mergeAttrs {
# todo MPD module (using read_file most likely, or switch to i3blocks)
"cpu_usage" = {
@ -234,13 +235,25 @@ in {
};
"tztime local" = {
position = 3;
position = 4;
settings = {
format = "%Y-%m-%d %H:%M:%S (%A)";
};
};
} (optionalAttrs cfg.battery {
"battery 0" = {
position = 3;
settings = {
format = "bat%status: %percentage";
status_chr = "(+)";
status_bat = "";
status_unk = "(?)";
status_full = "(+)";
low_threshold = 30;
};
};
});
};
home.packages = with pkgs; [
autotiling