Initial commit
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Path to the image is the first argument
|
||||
IMAGE="$1"
|
||||
|
||||
echo "start"
|
||||
|
||||
# Check if an image was provided
|
||||
if [[ -z "$IMAGE" ]]; then
|
||||
echo "Usage: $0 /path/to/image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if swww daemon is running
|
||||
if ! pgrep -x "swww-daemon" > /dev/null; then
|
||||
echo "Starting swww daemon..."
|
||||
swww-daemon &
|
||||
|
||||
# Give the daemon a moment to start
|
||||
sleep 0.2
|
||||
echo "daemon started"
|
||||
fi
|
||||
|
||||
# Set the wallpaper
|
||||
echo "running"
|
||||
swww img "$IMAGE" -t grow --transition-duration 1
|
||||
|
||||
Reference in New Issue
Block a user