dotfiles/.scripts/swaylock.sh
Viyurz cf713cb0b4
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).
2023-12-05 11:04:52 +01:00

70 lines
1.6 KiB
Bash
Executable file

#!/bin/sh
source "$HOME/.cache/colors.sh"
options=(
--daemonize
--font Hack
--indicator-caps-lock
--indicator-radius 100
--indicator-thickness 7
--text-color "$foreground"
--text-caps-lock-color "$foreground"
--text-ver-color "$foreground"
--text-wrong-color "$foreground"
--text-clear-color "$disabled"
--ring-color "$accent1"
--ring-caps-lock-color "$accent2"
--ring-ver-color "$good"
--ring-wrong-color "$bad"
--ring-clear-color "$disabled"
--key-hl-color "$foreground"
--bs-hl-color "$disabled"
--caps-lock-key-hl-color "$foreground"
--caps-lock-bs-hl-color "$disabled2"
--separator-color 00000000
--line-color 00000000
--line-caps-lock-color 00000000
--line-ver-color 00000000
--line-wrong-color 00000000
--line-clear-color 00000000
--inside-color 00000000
--inside-caps-lock-color 00000000
--inside-ver-color 00000000
--inside-wrong-color 00000000
--inside-clear-color 00000000
--separator-color 00000000
)
if swaylock --help 2>&1 | grep -qe '--screenshots'; then
options+=(
--disable-caps-lock-text
--indicator
--clock
--screenshots
--effect-blur 7x5
--effect-vignette 0.5:0.5
--grace 0
--fade-in 0.2
)
else
options+=(
--show-failed-attempts
--indicator-idle-visible
)
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
options+=(
--fingerprint
)
fi
swaylock "${options[@]}"
$HOME/.scripts/set-wallpaper.sh -r