diff --git a/install.sh b/install.sh index 4f40219..750b8a7 100755 --- a/install.sh +++ b/install.sh @@ -144,6 +144,7 @@ backup_and_copy "$SCRIPT_DIR/ags" "$HOME_DIR/.config/ags" "AGS config" backup_and_copy "$SCRIPT_DIR/hypr" "$HOME_DIR/.config/hypr" "Hyprland config" backup_and_copy "$SCRIPT_DIR/branding" "$HOME_DIR/.config/omarchy/branding" "Branding files" backup_and_copy "$SCRIPT_DIR/omarchy/hooks" "$HOME_DIR/.config/omarchy/hooks" "Omarchy hooks" +backup_and_copy "$SCRIPT_DIR/wallpapers" "$HOME_DIR/wallpapers" "Custom wallpapers" mkdir -p "$HOME_DIR/scripts" backup_and_copy "$SCRIPT_DIR/scripts" "$HOME_DIR/scripts" "Custom scripts" diff --git a/scripts/blob_wallpaper.sh b/scripts/blob_wallpaper.sh index 338be65..c56bf09 100755 --- a/scripts/blob_wallpaper.sh +++ b/scripts/blob_wallpaper.sh @@ -1,13 +1,25 @@ #!/bin/bash + +WALLPAPER_DIR="$HOME/wallpapers" + +# Create the directory if it doesn't exist +mkdir -p "$WALLPAPER_DIR" + if [ -z "$1" ]; then - echo "Usage: blob_wallpaper " + echo "Usage: blob_wallpaper " + echo "Available wallpapers in $WALLPAPER_DIR:" + ls -1 "$WALLPAPER_DIR" 2>/dev/null || echo "No wallpapers found." exit 1 fi -IMAGE_PATH=$(realpath "$1") - -if [ ! -f "$IMAGE_PATH" ]; then - echo "Error: File '$IMAGE_PATH' does not exist." +# Check if the argument is a file in the wallpapers directory +if [ -f "$WALLPAPER_DIR/$1" ]; then + IMAGE_PATH=$(realpath "$WALLPAPER_DIR/$1") +# Check if the argument is an absolute or relative path +elif [ -f "$1" ]; then + IMAGE_PATH=$(realpath "$1") +else + echo "Error: File '$1' does not exist in $WALLPAPER_DIR or as a valid path." exit 1 fi