~scripts
58 itemsDownload ./*

58 itemsDownload ./*

..
display
dzen2
nginx
tiling
vosh
4cdl
4trips
alarm
ambient
battery-monitor
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton.sh
dailywall
dmenu
ffthumb
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
mp3ogg
netspeed.sh
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
readystart.sh
rotate.sh
scan.sh
screencast
screencast2
scrot
scrotw
search
skull
slocker
startblender.sh
starwars
streamit
sumnum
synctimedate.sh
tty-colorize
usrmount
ytp
ytplay
zombie-restart.sh


scriptsrandwall
2 123•  7 years ago•  DownloadRawClose
7 years ago•  2 123

{}
#!/bin/bash
#
# Author:      Twily                            2017
# Description: Wallpaper switcher ever X second.
# Usage:       $ nohup ./randwall > /dev/null 2>&1 &
#              (ps aux|grep randwall)
# Requires:    curl and python for remote wallpapers
# Source:      desktoppr: https://gist.github.com/zviryatko/055f8f4850bf17323c4f127a4daeccdf
#

lock() {
    exec 200>/var/lock/.randwall.exclusivelock
    flock -n 200 && return 0 || return 1
}
lock || exit 1


DIR="/home/amalie/Pictures/WP"
LST="/tmp/myimages.list"

SEC=$(( 10 * 60  ))

while :; do
    # Use local images
    #rm -f "$LST"
    #find $DIR -type f \( -iname \*.jpg -o -iname \*.jpeg -o -iname \*.png \) > "$LST"
    #PIC=$(shuf -n 1 "$LST")

    # Use remote images (requires curl, python, optional imagemagic)
    PIC="/tmp/wallpaper.jpg"
    curl -s `curl -s https://api.desktoppr.co/1/wallpapers/random | python -c "import json,sys; obj=json.load(sys.stdin); print obj['response']['image']['url'];"` > $PIC
    convert $PIC -blur 0x16 $PIC

    #pcmanfm --set-wallpaper "$PIC"
    feh "$PIC" --bg-fill

    sleep $SEC
done


exit

Top
©twily.info 2013 - 2024
twily at twily dot info



2 169 959 visits
... ^ v