Now hyprlock uses current wallpaper as background

This commit is contained in:
2024-08-28 11:03:50 +02:00
parent f04cb6b0e6
commit 18e64b4b9d
2 changed files with 10 additions and 3 deletions

View File

@@ -1,9 +1,16 @@
#!/bin/sh
swaybg -i $(find ~/.config/hypr/wallpapers/ -type f | shuf -n1) &
mkdir -p ~/.config/hypr/hyprlock/
wallpaper=$(find ~/.config/hypr/wallpapers/ -type f | shuf -n1)
swaybg -i $wallpaper &
# Update hyprlock background
cp $wallpaper ~/.config/hypr/hyprlock/background.jpg
OLD_PID=$!
while true; do
wallpaper=$(find ~/.config/hypr/wallpapers/ -type f | shuf -n1)
sleep 600
swaybg -i $(find ~/.config/hypr/wallpapers/ -type f | shuf -n1) &
swaybg -i $wallpaper &
# Update hyprlock background
cp $wallpaper ~/.config/hypr/hyprlock/background.jpg
NEXT_PID=$!
sleep 5
kill $OLD_PID

View File

@@ -1,6 +1,6 @@
background {
monitor =
path = screenshot
path = ~/.config/hypr/hyprlock/background.jpg
color = rgba(25, 20, 20, 1.0)
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations