View difference between Paste ID: CDtgjCRa and zvHnSHHn
SHOW: | | - or go back to the newest paste.
1
#!/usr/bin/env bash
2
# =================================================
3
# CREATED: Seg 30/Dez/2013 hs 15:07
4
# LAST CHANGE: 2013 Dez 30 15:11:22
5
# THIS SCRIPT AIMS: change wallpaper in gnome-shell
6
# AUTHOR: Sérgio Luiz Araújo Silva
7
# SITE: http://vivaotux.blogspot.com
8
# TWITTER: @voyeg3r
9
# SKYPE: sergioaraujosilva
10
# =================================================
11
# source: http://superuser.com/questions/298050/periodically-changing-wallpaper-under-gnome-3
12
13
# CHANGE THE FOLDERS NAME AND USER!
14
# to run this script automaticaly in gnome-shell create
15
# this file in ~/.config/autostart/cwall.desktop
16
17
# ------- cwall.desktop file ----
18
# [Desktop Entry]
19
# Type=Application
20
# Exec=/home/sergio/bin/cwall
21
# Hidden=false
22
# NoDisplay=false
23
# X-GNOME-Autostart-enabled=true
24
# Name[pt_BR]=changewallpaper
25
# Name=changewallpaper
26
# Comment[pt_BR]=change wallpaper periodicaly
27
# Comment=change wallpaper periodicaly
28
# ---------------------------------------------
29
30
WP_DIR=/home/sergio/Pictures/wallpapers
31
32-
cd $WP_DIR
32+
33
  do
34
set -- *
35
  WP=`ls -1 "$WP_DIR" | shuf -n1`
36
  gsettings set org.gnome.desktop.background picture-uri "file://$WP_DIR/${WP}"
37
38
  # time mesured in seconds, 300 means 5 minutes
39
  sleep 300
40
done