swap to gtklock
This commit is contained in:
parent
c5c04a8aac
commit
502f41380b
1 changed files with 270 additions and 46 deletions
|
|
@ -4,49 +4,21 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
lock = "pidof gtklock || ${lib.getExe config.programs.gtklock.package}";
|
||||
in
|
||||
{
|
||||
services.logind.settings.Login.HandlePowerKey = "suspend";
|
||||
|
||||
programs = {
|
||||
hyprlock.enable = true;
|
||||
programs.fht-compositor = {
|
||||
# We log in automatically, so lock straight away.
|
||||
settings.autostart = [ lock ];
|
||||
|
||||
fht-compositor.sessionPrograms.hypridle =
|
||||
"${lib.getExe pkgs.hypridle} --config ${pkgs.writeText "hypridle.conf" ''
|
||||
general {
|
||||
lock_cmd = pidof hyprlock || ${lib.getExe pkgs.hyprlock} --config ${
|
||||
let
|
||||
inherit (config.lib.stylix) colors;
|
||||
in
|
||||
pkgs.writeText "hyprlock.conf" ''
|
||||
background {
|
||||
path = screenshot
|
||||
blur_passes = 3
|
||||
}
|
||||
|
||||
label {
|
||||
text = $TIME
|
||||
font_size = 96
|
||||
position = 0, 200
|
||||
}
|
||||
|
||||
label {
|
||||
text = cmd[update:60000] date +"%A, %B %-d"
|
||||
font_size = 20
|
||||
position = 0, 110
|
||||
}
|
||||
|
||||
input-field {
|
||||
size = 300, 50
|
||||
outline_thickness = 0
|
||||
inner_color = rgb(${colors.base01})
|
||||
font_color = rgb(${colors.base05})
|
||||
check_color = rgb(${colors.base0D})
|
||||
fade_on_empty = false
|
||||
}
|
||||
''
|
||||
}
|
||||
before_sleep_cmd = loginctl lock-session
|
||||
}
|
||||
''}";
|
||||
sessionPrograms.hypridle = "${lib.getExe pkgs.hypridle} --config ${pkgs.writeText "hypridle.conf" ''
|
||||
general {
|
||||
lock_cmd = ${lock}
|
||||
before_sleep_cmd = loginctl lock-session
|
||||
}
|
||||
''}";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue