diff --git a/home/modules/hyprland/hyprlock.nix b/home/modules/hyprland/hyprlock.nix index 4fbbd74..bbbae73 100644 --- a/home/modules/hyprland/hyprlock.nix +++ b/home/modules/hyprland/hyprlock.nix @@ -14,6 +14,10 @@ in in /*hyprlang*/ '' + general { + ignore_empty_input = true + } + background { monitor = path = ${blurred_image} @@ -30,7 +34,7 @@ in outer_color = rgb(151515) inner_color = rgb(FFFFFF) font_color = rgb(10, 10, 10) - fade_on_empty = true + fade_on_empty = false fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. placeholder_text = Input Password... # Text rendered in the input box when it's empty. hide_input = false @@ -64,7 +68,7 @@ in label { monitor = - text = $USER + text = ${config.profile.user.fullName} color = rgba(200, 200, 200, 1.0) font_size = 20 font_family = Fira Semibold @@ -77,7 +81,7 @@ in image { monitor = - path = $HOME/.cache/wallpaper/square_wallpaper.png + path = $HOME/.cache/wallpaper/square.png size = 280 # lesser side if not 1:1 ratio rounding = -1 # negative values mean circle border_size = 4 diff --git a/home/modules/hyprland/pyprland.nix b/home/modules/hyprland/pyprland.nix index 8c77b9a..e062a0f 100644 --- a/home/modules/hyprland/pyprland.nix +++ b/home/modules/hyprland/pyprland.nix @@ -7,13 +7,15 @@ let image_file=$1 target="${wallpaperDir}/current" blur_target="${wallpaperDir}/blurred.png" + square_target="${wallpaperDir}/square.png" mkdir -p "${wallpaperDir}" echo "$image_file" > "${wallpaperDir}/origin.txt" cp "$image_file" "$target" swww img "$target" ${unstable.wallust}/bin/wallust run "$target" - ${pkgs.imagemagick}/bin/gm convert -resize 75% -blur 50x30 "$target" "$blur_target" + ${pkgs.graphicsmagick}/bin/gm convert -resize 75% -blur 50x30 "$target" "$blur_target" + ${pkgs.imagemagick}/bin/magick "$target" -resize 25% -gravity Center -extent 1:1 "$square_target" ''; in { diff --git a/home/modules/hyprland/wallust.nix b/home/modules/hyprland/wallust.nix index c92ca1b..3c6cf80 100644 --- a/home/modules/hyprland/wallust.nix +++ b/home/modules/hyprland/wallust.nix @@ -7,7 +7,8 @@ let initWallPaperScript = pkgs.writeShellScriptBin "init-wallpaper.sh" '' init_wallpaper="${./wallpaper.jpeg}" cache_file="${wallpaperDir}/current" - blurred="${wallpaperDir}/blurred" + blurred="${wallpaperDir}/blurred.png" + square="${wallpaperDir}/square.png" mkdir -p "${wallpaperDir}" @@ -16,7 +17,11 @@ let fi if [ ! -f "$blurred" ]; then - ${pkgs.imagemagick}/bin/gm convert -resize 75% -blur 50x30 "$cache_file" "$blurred" + ${pkgs.graphicsmagick}/bin/gm convert -resize 75% -blur 50x30 "$cache_file" "$blurred" + fi + + if [ ! -f "$square" ]; then + ${pkgs.imagemagick}/bin/magick "$cache_file" -resize 25% -gravity Center -extent 1:1 "$square" fi if [ ! -f "${config.home.homeDirectory}/.cache/wallust/sequences" ]; then