From 8b88b8c9950b0bf47c00f4789a40cfacb93de3ea Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Wed, 18 Jun 2025 15:30:43 +0200 Subject: [PATCH] hyprlock --- modules/common.nix | 2 + modules/home/hyprlock.nix | 103 ++++++-------------------------------- 2 files changed, 18 insertions(+), 87 deletions(-) diff --git a/modules/common.nix b/modules/common.nix index 604bfb0..d046518 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -162,7 +162,9 @@ fonts.packages = with pkgs; [ intel-one-mono # Monospace font for coding noto-fonts # Comprehensive Unicode support + noto-fonts-cjk-sans # CJK support noto-fonts-emoji # Emoji support + nerd-fonts.symbols-only # Symbols ]; # ================================ diff --git a/modules/home/hyprlock.nix b/modules/home/hyprlock.nix index feb79ae..2b9cb05 100644 --- a/modules/home/hyprlock.nix +++ b/modules/home/hyprlock.nix @@ -1,9 +1,11 @@ -{ +let + colors = import ../gruvbox-theme.nix; +in { programs.hyprlock = { enable = true; settings = { background = { - path = "./images/sunset-rocks.png"; + path = "$HOME/git/nixos/modules/home/images/sunset-rocks.png"; blur_passes = 2; contrast = 1; brightness = 0.5; @@ -13,9 +15,9 @@ # GENERAL general = { - no_fade_in = true; - no_fade_out = true; - hide_cursor = false; + no_fade_in = false; + no_fade_out = false; + hide_cursor = true; grace = 0; disable_loading_bar = true; }; @@ -30,11 +32,11 @@ dots_center = true; outer_color = "rgba(0, 0, 0, 0)"; inner_color = "rgba(0, 0, 0, 0.2)"; - font_color = "$foreground"; + font_color = colors.gruvbox.fg1; fade_on_empty = false; rounding = -1; - check_color = "rgb(204, 136, 34)"; - placeholder_text = "Input Password..."; + check_color = colors.gruvbox.yellow; + placeholder_text = "Input Password..."; hide_input = false; position = "0, -200"; halign = "center"; @@ -45,10 +47,9 @@ label = [ { monitor = ""; - text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\""; - color = "rgba(242, 243, 244, 0.75)"; - font_size = 22; - font_family = "JetBrains Mono"; + text = "cmd[update:10000] $(date +\"%A, %B %d\")"; + color = colors.gruvbox.fg2; + font_size = 34; position = "0, 300"; halign = "center"; valign = "center"; @@ -57,85 +58,13 @@ # TIME { monitor = ""; - text = "cmd[update:1000] echo \"$(date +\"%-I:%M\")\""; - color = "rgba(242, 243, 244, 0.75)"; - font_size = 95; - font_family = "JetBrains Mono Extrabold"; + text = "cmd[update:2000] $(date +\"%-I:%M\")"; + color = colors.gruvbox.fg1; + font_size = 94; position = "0, 200"; halign = "center"; valign = "center"; } - - # CURRENT SONG - { - monitor = ""; - text = "cmd[update:1000] echo \"$(/home/justin/Documents/Scripts/whatsong.sh)\""; - color = "$foreground"; - font_size = 18; - font_family = "Metropolis Light, Font Awesome 6 Free Solid"; - position = "0, 50"; - halign = "center"; - valign = "bottom"; - } - - { - monitor = ""; - text = "cmd[update:1000] echo \"$(/home/justin/Documents/Scripts/whoami.sh)\""; - color = "$foreground"; - font_size = 14; - font_family = "JetBrains Mono"; - position = "0, -10"; - halign = "center"; - valign = "top"; - } - - { - monitor = ""; - text = "cmd[update:1000] echo \"$(/home/justin/Documents/Scripts/battery.sh)\""; - color = "$foreground"; - font_size = 24; - font_family = "JetBrains Mono"; - position = "-90, -10"; - halign = "right"; - valign = "top"; - } - - { - monitor = ""; - text = "cmd[update:1000] echo \"$(/home/justin/Documents/Scripts/network-status.sh)\""; - color = "$foreground"; - font_size = 24; - font_family = "JetBrains Mono"; - position = "-20, -10"; - halign = "right"; - valign = "top"; - } - ]; - - # Profile Picture - image = [ - { - monitor = ""; - path = "/home/justin/Pictures/profile_pictures/justin_square.png"; - size = 100; - border_size = 2; - border_color = "$foreground"; - position = "0, -100"; - halign = "center"; - valign = "center"; - } - - # Desktop Environment - { - monitor = ""; - path = "/home/justin/Pictures/profile_pictures/hypr.png"; - size = 75; - border_size = 2; - border_color = "$foreground"; - position = "-50, 50"; - halign = "right"; - valign = "bottom"; - } ]; }; };