92 lines
2.2 KiB
Nix
92 lines
2.2 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
inherit (lib) getExe;
|
|
in
|
|
|
|
{
|
|
programs.swaylock = {
|
|
enable = true;
|
|
package = pkgs.swaylock-effects;
|
|
settings = {
|
|
# Background
|
|
color = "#232136";
|
|
image = config.services.swww-randomize.backgroundDir + "/Alena_Aenami-Clouds.jpg";
|
|
|
|
# Swaylock-effects
|
|
screenshot = true;
|
|
effect-blur = "5x5";
|
|
fade-in = "1";
|
|
clock = true;
|
|
indicator = true;
|
|
datestr = "";
|
|
|
|
# Layout text colors
|
|
layout-bg-color = "#00000000";
|
|
layout-border-color = "#00000000";
|
|
layout-text-color = "#e0def4";
|
|
|
|
# Text color
|
|
text-color = "#3e8fb0";
|
|
text-clear-color = "#9ccdf8";
|
|
text-caps-lock-color = "#f6c177";
|
|
text-ver-color = "#c4a7e7";
|
|
text-wrong-color = "#eb6f92";
|
|
|
|
# Highlight segments
|
|
bs-hl-color = "#23213666";
|
|
key-hl-color = "#3e8fb0";
|
|
caps-lock-bs-hl-color = "#23213666";
|
|
caps-lock-key-hl-color = "#f6c177";
|
|
|
|
# Inside of the indicator
|
|
inside-color = "#22222add";
|
|
inside-clear-color = "#22222add";
|
|
inside-caps-lock-color = "#22222add";
|
|
inside-ver-color = "#22222add";
|
|
inside-wrong-color = "#22222add";
|
|
|
|
# Line between inside and ring
|
|
line-color = "#3e8fb011";
|
|
line-clear-color = "#9ccfd811";
|
|
line-caps-lock-color = "#f6c17711";
|
|
line-ver-color = "#c4a7e711";
|
|
line-wrong-color = "#eb6f9211";
|
|
|
|
# Indicator ring
|
|
ring-color = "#3e8fb0aa";
|
|
ring-clear-color = "#9ccfd8aa";
|
|
ring-caps-lock-color = "#f6c177aa";
|
|
ring-ver-color = "#c4a7e7aa";
|
|
ring-wrong-color = "#eb6f92aa";
|
|
|
|
# Indicator
|
|
font = "Maple Mono NF";
|
|
indicator-radius = 80;
|
|
indicator-thickness = 8;
|
|
};
|
|
};
|
|
services.swayidle = {
|
|
enable = true;
|
|
timeouts = [
|
|
{
|
|
timeout = 300;
|
|
command = "${getExe pkgs.brightnessctl} -s s $(($(${getExe pkgs.brightnessctl} g) / 2))";
|
|
resumeCommand = "${getExe pkgs.brightnessctl} -r";
|
|
}
|
|
{
|
|
timeout = 360;
|
|
command = "${getExe pkgs.swaylock-effects} -f";
|
|
}
|
|
];
|
|
events = {
|
|
before-sleep = "${getExe pkgs.swaylock-effects} -f";
|
|
lock = "${getExe pkgs.swaylock-effects} -f";
|
|
};
|
|
};
|
|
}
|