aboutsummaryrefslogtreecommitdiffstats
path: root/home/hyprlock.nix
blob: bd5434846c991263901f6b969d2fcb3a9c998895 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{ vars, pkgs, ... }:

{
  programs.hyprlock = {
    enable = true;
    settings = {
      general = {
        grace = 300;
        hide_cursor = true;
        ignore_empty_input = true;
      };

      animations = {
        enabled = true;
        bezier = "linear, 1, 1, 0, 0";
        animation = [
          "fadeIn, 1, 5, linear"
          "fadeOut, 1, 5, linear"
          "inputFieldDots, 1, 2, linear"
        ];
      };

      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;
          shadow_passes = 2;
        }
      ];

      label = [
        # Clock with seconds
        {
          monitor = "";
          text = "cmd[update:1000] echo \"$(date +'%H:%M:%S')\"";
          color = "rgb(202, 211, 245)";
          font_size = 120;
          position = "0, 150";
          halign = "center";
          valign = "center";
          shadow_passes = 2;
        }
        # Date in ISO format
        {
          monitor = "";
          text = "cmd[update:1000] echo \"$(date +'%Y-%m-%d')\"";
          color = "rgb(202, 211, 245)";
          font_size = 25;
          position = "0, 50";
          halign = "center";
          valign = "center";
          shadow_passes = 2;
        }
      ];
    };
  };
}