mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 17:47:09 +00:00
25 lines
500 B
Bash
Executable File
25 lines
500 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Folder selector for wallpaper slideshow
|
|
|
|
START_DIR="${1:-$HOME/Pictures/Wallpapers}"
|
|
|
|
# Ensure start dir exists, fallback to Pictures or Home
|
|
if [ ! -d "$START_DIR" ]; then
|
|
START_DIR="$HOME/Pictures"
|
|
fi
|
|
if [ ! -d "$START_DIR" ]; then
|
|
START_DIR="$HOME"
|
|
fi
|
|
|
|
FOLDER=$(zenity --file-selection \
|
|
--directory \
|
|
--title="Select Wallpaper Folder" \
|
|
--filename="$START_DIR/" 2>/dev/null)
|
|
|
|
if [ $? -eq 0 ] && [ -n "$FOLDER" ]; then
|
|
echo "$FOLDER"
|
|
else
|
|
echo "null"
|
|
fi
|