Switch from gtklock to hyprlock

This commit is contained in:
Julian Mutter 2024-06-15 12:43:34 +02:00
parent a9d0e298b3
commit baf240c27d
3 changed files with 59 additions and 74 deletions

View File

@ -38,7 +38,7 @@ in
waybar.enable = true;
wofi.enable = true;
mako.enable = true;
gtklock.enable = true;
hyprlock.enable = true;
wlogout.enable = true;
};
@ -68,39 +68,6 @@ in
# services.copyq.enable = true;
# programs.hyprlock.enable = true;
# programs.hyprlock.settings = {
# general = {
# disable_loading_bar = true;
# hide_cursor = true;
# ignore_empty_input = true;
# };
# background = [
# {
# path = "screenshot";
# blur_passes = 3;
# blur_size = 8;
# }
# ];
# input-field = [
# {
# size = "200, 50";
# position = "0, -80";
# monitor = "";
# dots_center = true;
# fade_on_empty = false;
# font_color = "rgb(202, 211, 245)";
# inner_color = "rgb(91, 96, 120)";
# outer_color = "rgb(24, 25, 38)";
# outline_thickness = 5;
# placeholder_text = "Password...";
# shadow_passes = 2;
# }
# ];
# };
# services.hypridle = {
# enable = true;
# settings = {
@ -317,7 +284,7 @@ in
# other commands
"$mod, Escape, exec, wlogout -p layer-shell"
"$mod, TAB, exec, gtklock"
"$mod, TAB, exec, hyprlock"
"$mod SHIFT, R, exec, hyprctl reload"
", Print, exec, grimblast --notify copysave area"

View File

@ -1,39 +0,0 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.gtklock;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.gtklock =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable the gtklock screen locker.";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ gtklock ];
xdg.configFile."gtklock/style.css".text = ''
window {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-color: #${palette.base00};
}
clock-label {
color: #${palette.base05};
}
'';
};
}

View File

@ -0,0 +1,57 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.hyprlock;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.hyprlock =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable the hyprlock screen locker.";
};
config = lib.mkIf cfg.enable {
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
general = {
disable_loading_bar = true;
hide_cursor = true;
ignore_empty_input = true;
};
background = [
{
color = "#${palette.base00}";
# path = "screenshot";
# blur_passes = 3;
# blur_size = 8;
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "#${palette.base0B}";
inner_color = "#${palette.base01}";
outer_color = "#${palette.base05}";
outline_thickness = 5;
placeholder_text = "Password...";
}
];
};
};
}