feat(hypr): switch from swaylock to hyprlock
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-03-03 17:18:59 -05:00
parent a13b221e49
commit 477ef7759a
6 changed files with 53 additions and 67 deletions

View file

@ -34,5 +34,6 @@ in {
sudo.text = mkDefault (mkBefore grosshackConf);
login.text = mkDefault (mkBefore grosshackConf);
polkit-1.text = mkDefault (mkBefore grosshackConf);
hyprlock.text = mkDefault (mkBefore grosshackConf);
};
}

Binary file not shown.

BIN
flake.nix

Binary file not shown.

View file

@ -0,0 +1,48 @@
{
config,
hyprlock,
lib,
...
}: let
inherit (lib) optionalString;
inherit (config.vars) mainMonitor;
monitor = optionalString (mainMonitor != null) mainMonitor;
in {
imports = [hyprlock.homeManagerModules.default];
programs.hyprlock = {
enable = true;
general = {
hide_cursor = false;
};
backgrounds = [
{
path = "screenshot";
blur_size = 5;
blur_passes = 2;
vibrancy_darkness = 0.0;
}
];
input-fields = [
{
inherit monitor;
fade_on_empty = false;
outer_color = "rgba(10, 10, 10, 1.0)";
inner_color = "rgb(151515)";
font_color = "rgba(240, 240, 240, 1.0)"; # This is the dot color
placeholder_text = ''<span foreground="##cccccc" style="italic">Input Password...</span>'';
}
];
labels = [
{
inherit monitor;
text = "<i> Groovy </i>";
font_family = "Ubuntu Mono";
}
];
};
}

View file

@ -14,7 +14,7 @@ in {
../greetd
];
security.pam.services.swaylock = {};
security.pam.services.hyprlock = {};
services.gnome.gnome-keyring.enable = true;
home-manager.users.${mainUser} = let
@ -23,16 +23,16 @@ in {
name = "lock";
runtimeInputs = [
hmCfg.programs.ags.finalPackage
hmCfg.programs.swaylock.package
hmCfg.programs.hyprlock.package
];
text = ''
ags -r 'Tablet.setLaptopMode()'
swaylock -C ${hmCfg.xdg.configHome}/swaylock/config
hyprlock
'';
};
in {
imports = [
./swaylock.nix
./hyprlock.nix
hypridle.homeManagerModules.default
];

View file

@ -1,63 +0,0 @@
{pkgs, ...}: {
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
font = "Ubuntu";
clock = true;
timestr = "%R";
datestr = "%a, %e of %B";
screenshots = true;
# FIXME: doesn't work
submit-on-touch = true;
# Very delayed for some reason
#fade-in = 0.1;
effect-blur = "20x2";
#effect-greyscale = true;
#effect-scale = 0.3;
indicator = true;
indicator-radius = 240;
indicator-thickness = 20;
indicator-caps-lock = true;
key-hl-color = "880033";
separator-color = "00000000";
inside-color = "00000099";
inside-clear-color = "ffd20400";
inside-caps-lock-color = "009ddc00";
inside-ver-color = "d9d8d800";
inside-wrong-color = "ee2e2400";
ring-color = "231f20D9";
ring-clear-color = "231f20D9";
ring-caps-lock-color = "231f20D9";
ring-ver-color = "231f20D9";
ring-wrong-color = "231f20D9";
line-color = "00000000";
line-clear-color = "ffd204FF";
line-caps-lock-color = "009ddcFF";
line-ver-color = "d9d8d8FF";
line-wrong-color = "ee2e24FF";
text-color = "CBA6F7FF";
text-clear-color = "ffd20400";
text-ver-color = "d9d8d800";
text-wrong-color = "ee2e2400";
bs-hl-color = "ee2e24FF";
caps-lock-key-hl-color = "ffd204FF";
caps-lock-bs-hl-color = "ee2e24FF";
disable-caps-lock-text = true;
text-caps-lock-color = "009ddc";
};
};
}