Skip to content

Commit 423fa55

Browse files
committed
feat(programs): add hyprlock
1 parent f7a4d30 commit 423fa55

File tree

4 files changed

+52
-3
lines changed

4 files changed

+52
-3
lines changed

flake.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/programs/hyprlock.nix

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
module-functions,
3+
hm,
4+
config,
5+
...
6+
}:
7+
module-functions.module "programs" "hyprlock" {
8+
hm.programs.hyprlock = {
9+
enable = true;
10+
settings = {
11+
general = {
12+
disable_loading_bar = true;
13+
hide_cursor = true;
14+
grace = 0;
15+
no_fade_in = true;
16+
};
17+
18+
background = {
19+
monitor = "";
20+
color = "rgb(${config.yunfachi.rice.colorscheme.base01.rgb})";
21+
};
22+
23+
input-field = {
24+
monitor = "";
25+
size = "200, 50";
26+
27+
outline_thickness = 0;
28+
dots_rounding = 0;
29+
rounding = 0;
30+
31+
fade_on_empty = false;
32+
placeholder_text = "<span foreground=\"#${config.yunfachi.rice.colorscheme.base05.hex}\">Password:</span>";
33+
fail_text = "<span foreground=\"#${config.yunfachi.rice.colorscheme.base03.hex}\">Wrong</span>";
34+
35+
inner_color = "rgb(${config.yunfachi.rice.colorscheme.base03.rgb})";
36+
font_color = "rgb(${config.yunfachi.rice.colorscheme.base05.rgb})";
37+
check_color = "rgb(${config.yunfachi.rice.colorscheme.base04.rgb})";
38+
fail_color = "rgb(${config.yunfachi.rice.colorscheme.base08.rgb})";
39+
};
40+
};
41+
};
42+
}

modules/services/graphical/hyprland/binds.nix

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
module-functions,
33
hm,
44
lib,
5+
config,
56
...
67
}:
78
module-functions.module "services" "hyprland" {
@@ -22,6 +23,7 @@ module-functions.module "services" "hyprland" {
2223
[
2324
"$mod, q, killactive,"
2425
"CTRLALT, Delete, exit,"
26+
(lib.mkIf config.yunfachi.programs.hyprlock.enable "$mod, l, exec, hyprlock")
2527

2628
"$mod, Return, exec, $terminal"
2729

options/programs/hyprlock.nix

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{option-functions, ...}:
2+
with option-functions;
3+
option "programs" "hyprlock" {
4+
enable = enableOption "hyprlock" true;
5+
}

0 commit comments

Comments
 (0)