Add laptop related config

This commit is contained in:
muon 2025-08-02 23:53:34 +00:00
parent c132f9fba9
commit 71c6c34fda
3 changed files with 55 additions and 24 deletions

View file

@ -14,6 +14,7 @@ let
};
in with lib; {
options.mods.i3.enable = mkEnableOption "enables i3";
options.mods.battery.enable = mkEnableOption "enables battery";
config = mkIf config.mods.i3.enable {
services.unclutter.enable = true;
@ -21,29 +22,53 @@ in with lib; {
programs.i3status-rust = {
enable = true;
bars.default = {
settings.theme.overrides = with config.lib.stylix.colors.withHashtag; {
idle_bg = base00;
idle_fg = base05;
separator = "";
};
icons = "awesome5";
blocks = [
{
block = "sound";
format = " $icon $volume ";
click = [{
button = "left";
cmd = "${lib.getExe pkgs.pavucontrol}";
}];
}
{
block = "time";
format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') ";
interval = 1;
}
];
};
bars.default = lib.mkMerge [
{
blocks = lib.mkBefore [
{
block = "privacy";
driver = [ { name = "v4l"; } { name = "pipewire"; } ];
}
{
block = "net";
format = " $icon ";
inactive_format = " $icon ";
}
];
}
(lib.mkIf config.mods.battery.enable {
blocks = [{
block = "battery";
format = " $icon $percentage ";
# format_alt =
# " $icon $percentage {$time_remaining.dur(hms:true, min_unit:m) |}";
}];
})
{
settings.theme.overrides = lib.mkMerge [
{ separator = ""; }
config.lib.stylix.i3status-rust.bar
];
icons = "awesome5";
blocks = lib.mkAfter [
{
block = "sound";
format = " $icon {$volume |} ";
driver = "alsa";
click = [{
button = "left";
cmd = "${lib.getExe pkgs.pavucontrol}";
}];
}
{
block = "time";
format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') ";
# format_alt = "$icon $timestamp.datetime(f:'%Y-%m-%d %H:%M') ";
interval = 1;
}
];
}
];
};
xsession.windowManager.i3 = let