hyprlock: fix missing profile picture and user name set to full name

This commit is contained in:
Tigor Hutasuhut 2024-10-17 12:37:14 +07:00
parent 78c7c4a0bc
commit 54e7758c73
3 changed files with 17 additions and 6 deletions

View file

@ -14,6 +14,10 @@ in
in in
/*hyprlang*/ /*hyprlang*/
'' ''
general {
ignore_empty_input = true
}
background { background {
monitor = monitor =
path = ${blurred_image} path = ${blurred_image}
@ -30,7 +34,7 @@ in
outer_color = rgb(151515) outer_color = rgb(151515)
inner_color = rgb(FFFFFF) inner_color = rgb(FFFFFF)
font_color = rgb(10, 10, 10) font_color = rgb(10, 10, 10)
fade_on_empty = true fade_on_empty = false
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty. placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
hide_input = false hide_input = false
@ -64,7 +68,7 @@ in
label { label {
monitor = monitor =
text = $USER text = ${config.profile.user.fullName}
color = rgba(200, 200, 200, 1.0) color = rgba(200, 200, 200, 1.0)
font_size = 20 font_size = 20
font_family = Fira Semibold font_family = Fira Semibold
@ -77,7 +81,7 @@ in
image { image {
monitor = monitor =
path = $HOME/.cache/wallpaper/square_wallpaper.png path = $HOME/.cache/wallpaper/square.png
size = 280 # lesser side if not 1:1 ratio size = 280 # lesser side if not 1:1 ratio
rounding = -1 # negative values mean circle rounding = -1 # negative values mean circle
border_size = 4 border_size = 4

View file

@ -7,13 +7,15 @@ let
image_file=$1 image_file=$1
target="${wallpaperDir}/current" target="${wallpaperDir}/current"
blur_target="${wallpaperDir}/blurred.png" blur_target="${wallpaperDir}/blurred.png"
square_target="${wallpaperDir}/square.png"
mkdir -p "${wallpaperDir}" mkdir -p "${wallpaperDir}"
echo "$image_file" > "${wallpaperDir}/origin.txt" echo "$image_file" > "${wallpaperDir}/origin.txt"
cp "$image_file" "$target" cp "$image_file" "$target"
swww img "$target" swww img "$target"
${unstable.wallust}/bin/wallust run "$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 in
{ {

View file

@ -7,7 +7,8 @@ let
initWallPaperScript = pkgs.writeShellScriptBin "init-wallpaper.sh" '' initWallPaperScript = pkgs.writeShellScriptBin "init-wallpaper.sh" ''
init_wallpaper="${./wallpaper.jpeg}" init_wallpaper="${./wallpaper.jpeg}"
cache_file="${wallpaperDir}/current" cache_file="${wallpaperDir}/current"
blurred="${wallpaperDir}/blurred" blurred="${wallpaperDir}/blurred.png"
square="${wallpaperDir}/square.png"
mkdir -p "${wallpaperDir}" mkdir -p "${wallpaperDir}"
@ -16,7 +17,11 @@ let
fi fi
if [ ! -f "$blurred" ]; then 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 fi
if [ ! -f "${config.home.homeDirectory}/.cache/wallust/sequences" ]; then if [ ! -f "${config.home.homeDirectory}/.cache/wallust/sequences" ]; then