mabox-colorizer/bin/pcmanwp
2025-01-25 12:29:14 +01:00

24 lines
615 B
Bash
Executable File

#!/bin/bash
# pcmanfm based wallpaper chooser
# simple command for now
CNF_FILE="$HOME/.config/mabox/wallp_dirs.conf"
if [ ! -f $CNF_FILE ]; then
cat <<EOF > ${CNF_FILE}
# User wallpapers directories - one per line
# Used by "Choose wallpaper" PCmanFM wrapper
# Set wallpapers using context (right click) menu in file manager
~/wallpapers/
EOF
fi
#System wallpaper dirs
syswpdirs+=("/usr/share/backgrounds")
if [ -d "/usr/share/backgrounds/tiled" ]; then
syswpdirs+=("/usr/share/backgrounds/tiled")
fi
readarray -t wpdirs < <(grep "^[^#]" "${CNF_FILE}")
sh -c "pcmanfm -n $(echo ${syswpdirs[@]} ${wpdirs[@]})"