fix some stuffs and improve some stuffs

This commit is contained in:
krizej 2024-08-08 00:34:02 +02:00
parent 2def094022
commit f070dded55
2 changed files with 54 additions and 50 deletions

View file

@ -37,6 +37,7 @@
}; };
home-manager.enable = true; home-manager.enable = true;
xdg.enable = true;
stuff = { stuff = {
sddm.enable = true; sddm.enable = true;
@ -51,7 +52,7 @@
documentation.enable = true; documentation.enable = true;
theme.enable = true; theme.enable = true;
printing.enable = true; printing.enable = true;
xdg.enable = true; mpd.enable = true;
xserver = { xserver = {
enable = true; enable = true;

View file

@ -1,5 +1,5 @@
{ lib, pkgs, config, ...}: let { lib, pkgs, config, ...}: let
inherit (lib) mkIf mkEnableOption mkOption types optionals mergeAttrs optionalAttrs; inherit (lib) mkIf mkEnableOption mkOption types optionals mergeAttrs mergeAttrsList optionalAttrs;
cfg = config.chuj.stuff.i3; cfg = config.chuj.stuff.i3;
user = config.chuj.system.user; user = config.chuj.system.user;
in { in {
@ -215,18 +215,8 @@ in {
output_format = "i3bar"; output_format = "i3bar";
}; };
modules = mergeAttrs { modules = mergeAttrsList [
# todo MPD module (using read_file most likely, or switch to i3blocks) {
"read_file mpd" = {
position = -1;
settings = {
format = "%content";
path = "/tmp/i3-mpd-status-stuff";
color_good = "#ffffff";
};
};
"cpu_usage" = { "cpu_usage" = {
position = 0; position = 0;
settings = { settings = {
@ -258,7 +248,8 @@ in {
format = "%Y-%m-%d %H:%M:%S (%A)"; format = "%Y-%m-%d %H:%M:%S (%A)";
}; };
}; };
} (optionalAttrs cfg.battery { }
(optionalAttrs cfg.battery {
"battery 0" = { "battery 0" = {
position = 3; position = 3;
settings = { settings = {
@ -270,7 +261,19 @@ in {
low_threshold = 30; low_threshold = 30;
}; };
}; };
}); })
(optionalAttrs config.chuj.stuff.mpd.enable {
"read_file mpd" = {
position = -1;
settings = {
format = "%content";
format_bad = "mpdstatus file not found, restart i3";
path = "/tmp/i3-mpd-status-stuff";
color_good = "#ffffff";
};
};
})
];
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [