diff --git a/Assets/hyprlock.png b/Assets/hyprlock.png index 94d84ab..8b55052 100644 Binary files a/Assets/hyprlock.png and b/Assets/hyprlock.png differ diff --git a/Configs/.config/hypr/hyprlock.conf b/Configs/.config/hypr/hyprlock.conf index 2ec3d68..e5a72a3 100644 --- a/Configs/.config/hypr/hyprlock.conf +++ b/Configs/.config/hypr/hyprlock.conf @@ -1,68 +1,135 @@ +# Background background { monitor = - path = $HOME/.cache/wlogout_background - - blur_passes = 2 # 0 disables blurring - blur_size = 2 - noise = 0.011 - contrast = 0.9 + path = $HOME/.cache/lock_background + blur_passes = 2 + blur_size = 4 + contrast = 0.8 brightness = 0.6 - vibrancy = 0.2 - vibrancy_darkness = 0.0 + vibrancy = 0.16 + vibrancy_darkness = 0.05 } -input-field { +# General +general { +} + +# Day-Month-Date +label { monitor = - size = 200, 50 - outline_thickness = 3 - dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = true - dots_rounding = -1 # -1 default circle, -2 follow input-field rounding - outer_color = rgb(15, 15, 15) - inner_color = rgb(30, 30, 30) - font_color = rgb(200, 200, 200) - fade_on_empty = true - fade_timeout = 3000 # Milliseconds before fade_on_empty is triggered. - placeholder_text = Are you owner? # Text rendered in the input box when it's empty. - hide_input = false - rounding = -1 # -1 means complete rounding (circle/oval) - check_color = rgb(39, 123, 182) - fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color - fail_text = $FAIL ($ATTEMPTS) # can be set to empty - capslock_color = -1 - numlock_color = -1 - bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) - invert_numlock = false # change color if numlock is off - swap_font_color = false # see below - position = 0, -20 + text = cmd[update:10000] echo -e "$(date +"%A, %B %d")" + color = rgba(227, 227, 227, 0.7) + font_size = 25 + font_family = Inter Display Bold + position = 0, 250 halign = center valign = center } +# Time label { monitor = - #clock - text = cmd[update:1000] echo "$TIME" - color = rgb(200, 200, 200) - font_size = 90 - font_family = Fira Semibold + text = cmd[update:10000] echo "$(date +"%I:%M")" + color = rgba(227, 227, 227, 0.7) + font_size = 120 + font_family = Inter Display Bold position = 0, 150 halign = center valign = center - shadow_passes = 5 - shadow_size = 10 } -label { +# User-box +shape { monitor = - text = $USER - color = rgb(200, 200, 200) - font_size = 30 - font_family = Fira Semibold - position = 0, 50 + size = 300, 60 + color = rgba(255, 255, 255, .1) + rounding = -1 + border_size = 0 + border_color = rgba(255, 255, 255, 0) + rotate = 0 + xray = false + position = 0, -50 halign = center valign = center - shadow_passes = 5 - shadow_size = 10 +} + +# User +label { + monitor = + text =  $USER + color = rgba(231, 231, 231, 0.8) + font_size = 18 + font_family = Inter Display Bold + position = 0, -50 + halign = center + valign = center +} + +# Input Field +input-field { + monitor = + size = 300, 60 + outline_thickness = 2 + dots_size = 0.2 + dots_spacing = 0.2 + dots_center = true + outer_color = rgba(255, 255, 255, 0) + inner_color = rgba(255, 255, 255, 0.1) + check_color = rgba(255, 255, 255, 1) + font_color = rgb(200, 200, 200) + fade_on_empty = false + font_family = Inter Display Bold + placeholder_text = Password + hide_input = false + position = 0, -130 + halign = center + valign = center +} + +# Reboot +label { + monitor = + text = 󰜉 + color = rgba(255, 255, 255, 0.6) + font_size = 50 + onclick = reboot now + position = 20, 100 + halign = center + valign = bottom +} + +# Power off +label { + monitor = + text = 󰐥 + color = rgba(255, 255, 255, 0.6) + font_size = 50 + onclick = shutdown now + position = 840, 100 + halign = left + valign = bottom +} + +# Suspend +label { + monitor = + text = 󰤄 + color = rgba(255, 255, 255, 0.6) + font_size = 50 + onclick = systemctl suspend + position = -800, 100 + halign = right + valign = bottom +} + +# Battery +label { + monitor = + text = cmd[update:10000] sh -c '[ -f /sys/class/power_supply/BAT0/capacity ] || exit; cap=$(cat /sys/class/power_supply/BAT0/capacity); if [ "$cap" -ge 90 ]; then icon="󰁹"; elif [ "$cap" -ge 75 ]; then icon="󰂁"; elif [ "$cap" -ge 50 ]; then icon="󰁿"; elif [ "$cap" -ge 25 ]; then icon="󰁼"; else icon="󰁺"; fi; status=$(cat /sys/class/power_supply/BAT0/status); [ "$status" = "Charging" ] && icon="󰂄"; echo "$icon $cap%"' + color = rgba(227, 227, 227, 0.7) + font_size = 16 + font_family = Inter Display Bold + position = -20, 20 + halign = right + valign = bottom } diff --git a/Configs/.config/wlogout/current_wall.sh b/Configs/.config/wlogout/current_wall.sh index faaef9d..f3886c1 100755 --- a/Configs/.config/wlogout/current_wall.sh +++ b/Configs/.config/wlogout/current_wall.sh @@ -2,7 +2,10 @@ TARGET_DIR="$HOME/.cache" -SELECTED_WALLPAPER=$(waypaper --list | waypaper --list | jq -r '.[0].wallpaper') +SELECTED_WALLPAPER=$(waypaper --list | jq -r '.[0].wallpaper' 2>/dev/null) - -cp "$SELECTED_WALLPAPER" "$TARGET_DIR/wlogout_background" +if [[ -n "$SELECTED_WALLPAPER" && -f "$SELECTED_WALLPAPER" ]]; then + cp "$SELECTED_WALLPAPER" "$TARGET_DIR/lock_background" +else + echo "Failed to retrieve wallpaper from waypaper" >&2 +fi diff --git a/README.md b/README.md index 84dc794..cae6c54 100644 --- a/README.md +++ b/README.md @@ -259,7 +259,7 @@ yay -S rose-pine-cursor rose-pine-hyprcursor sudo pacman -S noto-fonts noto-fonts-emoji noto-fonts-cjk noto-fonts-extra ``` -- [JetBrains Mono Nerd](https://www.jetbrains.com/lp/mono/) для VSCode и Waybar +- [JetBrains Mono Nerd](https://www.jetbrains.com/lp/mono/) для VSCode и [Waybar](#waybar) ``` sudo pacman -S ttf-jetbrains-mono-nerd @@ -271,6 +271,12 @@ yay -S rose-pine-cursor rose-pine-hyprcursor yay -S ttf-meslo-nerd-font-powerlevel10k ``` +- [Inter](https://rsms.me/inter/) необходимый шрифт для [Hyprlock](#hyprlock) + + ``` + sudo pacman -S inter-font + ``` + ## Hypridle Поведение при бездействии [[конфиг](./Configs/.config/hypr/hypridle.conf)] diff --git a/Scripts/install.sh b/Scripts/install.sh index 50a90d0..d5503ec 100755 --- a/Scripts/install.sh +++ b/Scripts/install.sh @@ -167,7 +167,7 @@ main() { install_pacman brightnessctl playerctl print_section "🔤 Шрифты" - install_pacman noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra ttf-jetbrains-mono + install_pacman noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra ttf-jetbrains-mono inter-font install_yay ttf-meslo-nerd-font-powerlevel10k print_section "🎨 Темы и иконки"