Swaylock: Take into consideration state of weeb mode.

If weeb mode is off, swaylock will display the default Hyprland wallpaper
instead of the randomly chosen one when using the base swaylock (no
effects).
This commit is contained in:
Viyurz 2023-12-05 11:04:52 +01:00
parent 2e93a9da81
commit cf713cb0b4
No known key found for this signature in database
3 changed files with 38 additions and 1 deletions

32
.scripts/i3lock.sh Executable file
View file

@ -0,0 +1,32 @@
#!/bin/sh
source "$HOME/.cache/colors.sh"
options=(
--insidever-color=#00000000
--ringver-color=$good
--insidewrong-color=#00000000
--ringwrong-color=$bad
--inside-color=00000000
--ring-color=$accent1
--line-color=00000000
--separator-color=00000000
--verif-color=$foreground
--wrong-color=$foreground
--time-color=$foreground
--date-color=$foreground
--layout-color=$foreground
--keyhl-color=$foreground
--bshl-color=$disabled
--screen 1
--clock
--indicator
--time-str="%H:%M:%S"
--date-str="%A, %Y-%m-%d"
--keylayout 1
--image "$HOME/.cache/wallpaper-blurred.jpg"
)
i3lock "${options[@]}"
sw -r

View file

@ -353,3 +353,4 @@ fi
# Generate blurred wallpaper to use with swaylock/i3lock
convert "$wallpaper" -blur 0x5 -resize 1920x1080 "$HOME/.cache/wallpaper-blurred.jpg" &
[[ -f "$HOME/.cache/wallpaper-hypr-blurred.jpg" ]] || convert /usr/share/hyprland/wall_2K.png -blur 0x5 -resize 1920x1080 "$HOME/.cache/wallpaper-hypr-blurred.jpg" &

View file

@ -51,8 +51,12 @@ else
options+=(
--show-failed-attempts
--indicator-idle-visible
--image "$HOME/.cache/wallpaper-blurred.jpg"
)
if grep -q 1 "$HOME/.cache/weeb-mode"; then
options+=(--image "$HOME/.cache/wallpaper-blurred.jpg")
else
options+=(--image "$HOME/.cache/wallpaper-hypr-blurred.jpg")
fi
fi
if swaylock -v | grep -q fprintd; then