19 lines
392 B
Bash
19 lines
392 B
Bash
|
#!/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
|