Update 'nitrogen-random.sh'

Add prefixes to local variables to avoid collision with PATH
This commit is contained in:
NaiJi ✨ 2021-11-01 23:52:27 +01:00
parent bd912e0112
commit f30d9568c9
1 changed files with 9 additions and 11 deletions

View File

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