Update 'nitrogen-random.sh'

Add prefixes to local variables to avoid collision with PATH
master
NaiJi ✨ 2 years ago
parent bd912e0112
commit f30d9568c9

@ -1,18 +1,16 @@
#!/bin/bash
BGSAVED=/home/<user>/.config/nitrogen/bg-saved.cfg
WALLPAPERS=/home/<user>/Pictures/wallpapers/
MODE=4
nBGSAVED=/home/naiji/.config/nitrogen/bg-saved.cfg
nWALLPAPERS=/home/naiji/Pictures/wallpapers/lewd/
nMODE=4
export DISPLAY=:0
FILENAME="$(ls ${WALLPAPERS} | shuf -n 1)"
nPATH="$(ls ${nWALLPAPERS} | shuf -n 1)"
echo '[xin_0]' > ${BGSAVED}
echo "file=${WALLPAPERS}/${FILENAME}" >> ${BGSAVED}
echo "mode=${MODE}" >> ${BGSAVED}
echo 'bgcolor=#000000' >> ${BGSAVED}
echo '[xin_0]' > ${nBGSAVED}
echo "file=${nWALLPAPERS}/${nPATH}" >> ${nBGSAVED}
echo "mode=${nMODE}" >> ${nBGSAVED}
echo 'bgcolor=#000000' >> ${nBGSAVED}
/usr/bin/nitrogen --restore
# or just
# nitrogen --restore
nitrogen --restore
Loading…
Cancel
Save