dotfiles/.scripts/swaylock.sh

71 lines
1.6 KiB
Bash
Raw Normal View History

2023-09-26 17:12:28 +02:00
#!/bin/sh
source "$HOME/.cache/colors.sh"
2023-09-26 17:12:28 +02:00
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
2023-09-26 17:12:28 +02:00
fi
if swaylock -v | grep -q fprintd; then
options+=(
--fingerprint
)
fi
swaylock "${options[@]}"
$HOME/.scripts/set-wallpaper.sh -r