reorganization
This commit is contained in:
parent
2ad77494b2
commit
b6afba390b
24 changed files with 144 additions and 128 deletions
|
|
@ -11,7 +11,6 @@ in {
|
|||
default = pkgs.hypridle;
|
||||
example = "pkgs.hypridle";
|
||||
};
|
||||
desktop = mkEnableOption "Extend screen dimming time and disable sleeping";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
@ -30,12 +29,12 @@ in {
|
|||
|
||||
listener = [
|
||||
{
|
||||
timeout = if !cfg.desktop
|
||||
timeout = if config.modules.core.laptop
|
||||
then 60 * 2 # 2 min
|
||||
else 60 * 35; # 35 min
|
||||
on-timeout = "${pkgs.systemd}/bin/loginctl lock-session"; # lock computer
|
||||
}
|
||||
] ++ optionals (!cfg.desktop) [
|
||||
] ++ optionals (config.modules.core.laptop) [
|
||||
{
|
||||
timeout = 60; # 1 min
|
||||
on-timeout = "${lib.getExe pkgs.brightnessctl} -c backlight -s set 20"; # dim screen, save brightness state
|
||||
|
|
@ -51,7 +50,7 @@ in {
|
|||
on-timeout = "${pkgs.systemd}/bin/systemctl suspend"; # sleep/suspend
|
||||
}
|
||||
] ++ optional config.modules.desktop.niri.enable {
|
||||
timeout = if !cfg.desktop
|
||||
timeout = if config.modules.core.laptop
|
||||
then 90 # 1.5 min
|
||||
else 30 * 60; # 30 min
|
||||
on-timeout = "niri msg action power-off-monitors";
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ in {
|
|||
font_family = config.modules.desktop.fonts.fonts.sansSerif.family;
|
||||
halign = "center"; valign = "center";
|
||||
}
|
||||
] ++ optionals config.modules.core.laptop [
|
||||
{
|
||||
position = "-15, -11";
|
||||
halign = "right"; valign = "top";
|
||||
|
|
|
|||
|
|
@ -222,20 +222,6 @@ in {
|
|||
power-saver = " save";
|
||||
};
|
||||
};
|
||||
battery = {
|
||||
interval = 30;
|
||||
states = {
|
||||
warning = 20;
|
||||
critical = 10;
|
||||
};
|
||||
design-capacity = false;
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
format-critical = " {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
tooltip = true;
|
||||
tooltip-format = "{timeTo} ({power}W)";
|
||||
};
|
||||
privacy = {
|
||||
icon-spacing = 0;
|
||||
icon-size = 12;
|
||||
|
|
@ -326,6 +312,22 @@ in {
|
|||
return-type = "json";
|
||||
};
|
||||
}
|
||||
(mkIf config.modules.core.laptop {
|
||||
battery = {
|
||||
interval = 30;
|
||||
states = {
|
||||
warning = 20;
|
||||
critical = 10;
|
||||
};
|
||||
design-capacity = false;
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
format-critical = " {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
tooltip = true;
|
||||
tooltip-format = "{timeTo} ({power}W)";
|
||||
};
|
||||
})
|
||||
(mkIf config.modules.desktop.awww.enable {
|
||||
"custom/wallpaper" = {
|
||||
format = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue