From cf713cb0b41dfc0db72f064131ab58157c8aef81 Mon Sep 17 00:00:00 2001 From: Viyurz <128215328+Viyurz@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:04:52 +0100 Subject: [PATCH] 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). --- .scripts/i3lock.sh | 32 ++++++++++++++++++++++++++++++++ .scripts/set-wallpaper.sh | 1 + .scripts/swaylock.sh | 6 +++++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 .scripts/i3lock.sh diff --git a/.scripts/i3lock.sh b/.scripts/i3lock.sh new file mode 100755 index 0000000..19c99e8 --- /dev/null +++ b/.scripts/i3lock.sh @@ -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 diff --git a/.scripts/set-wallpaper.sh b/.scripts/set-wallpaper.sh index f1e21a5..9eaacbd 100755 --- a/.scripts/set-wallpaper.sh +++ b/.scripts/set-wallpaper.sh @@ -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" & diff --git a/.scripts/swaylock.sh b/.scripts/swaylock.sh index 31a96e5..7b3ed2e 100755 --- a/.scripts/swaylock.sh +++ b/.scripts/swaylock.sh @@ -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