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

@ -49,6 +49,11 @@ in {
WINIT_X11_SCALE_FACTOR = "1"; WINIT_X11_SCALE_FACTOR = "1";
}; };
## Laptop
powerManagement.enable = true;
services.thermald.enable = true;
services.tlp.enable = true;
## Mouse ## Mouse
services.libinput.mouse.accelProfile = "flat"; services.libinput.mouse.accelProfile = "flat";

View file

@ -6,6 +6,7 @@ in {
# Modules # Modules
mods.xdg.enable = true; mods.xdg.enable = true;
mods.i3.enable = true; mods.i3.enable = true;
mods.battery.enable = true;
mods.terminal.zsh.enable = true; mods.terminal.zsh.enable = true;
mods.terminal.emulator.enable = true; mods.terminal.emulator.enable = true;
mods.terminal.development.enable = true; mods.terminal.development.enable = true;
@ -18,6 +19,7 @@ in {
thunderbird thunderbird
pulseaudio pulseaudio
pavucontrol pavucontrol
alsa-utils
] ]
# Non-free </3 # Non-free </3
@ -25,7 +27,6 @@ in {
++ [ google-cloud-sdk ]; ++ [ google-cloud-sdk ];
# Hardware preferences # Hardware preferences
## Monitors ## Monitors
services.autorandr.enable = true; services.autorandr.enable = true;
programs.autorandr = { programs.autorandr = {

View file

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