Welcome, guest! Login / Register - Why register?
[email protected] webmail now available. Want one? Go here.
Windows getting boring or just want to try something Open Source for your next Desktop Environment?! Go Zorin OS.

Paste

Pasted as Bash by registered user uwe ( 9 years ago )
#!/bin/bash
if [ -f ~/.xlock ]; then exit; fi

if [ -f ~/bg/monitor_scc ]; then
    DISPLAY=:0 nitrogen --set-auto ~/bg/3840x1200/"$(ls ~/bg/3840x1200/ | shuf -n 1)"
    exit
else
    comb=~/bg/combined_3og
    first=~/bg/1920x1200
    sec=~/bg/1600x900
fi

pic1="$(ls $first/ | shuf -n 1)"
pic2="$(ls $sec/ | shuf -n 1)"

pic=$comb/"${pic1/.jpg}$pic2"

if [ ! -f "$pic" ]; then
    while [ $(ls $comb | wc -l) -gt 299 ]; do
        picr="$(ls $comb | shuf -n 1)"
        rm -f $comb/"$picr"
    done
    convert $first/"$pic1" $sec/"$pic2" +append "$pic"
fi

DISPLAY=:0 nitrogen --set-auto "$pic"

 

Revise this Paste

Your Name: Code Language: