master
NaiJi ✨ 3 years ago
commit bd912e0112

@ -0,0 +1,12 @@
# Nitrogen Random
Simply changes your nitrogen desktop wallpaper to a random image from provided folder.
### How to run ###
Edit the script and make all variables valid:
BGSAVED is the path to bg-saved.cfg of nitrogen, must be in your .config/nitrogen folder.
WALLPAPERS is the path to a folder where all your wallpapers are located.
You may also put it to crontab.

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