mabox-colorizer/bin/pcmanwp

24 lines
607 B
Plaintext
Raw Permalink Normal View History

2023-05-29 21:16:10 +02:00
#!/bin/bash
2022-12-23 22:51:29 +01:00
# pcmanfm based wallpaper chooser
# simple command for now
2023-05-29 21:16:10 +02:00
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[@]})