mabox-colorizer/bin/pcmanwp

24 lines
607 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}")
pcmanfm -n $(echo ${syswpdirs[@]} ${wpdirs[@]})