-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcycleImages.sh
36 lines (29 loc) · 1.1 KB
/
cycleImages.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
#This script will replace the planet image for glPlanet $dir
#All files should have file names without spaces until further notice -mwd
#Planets
dir='$HOME/Pictures/planets/'
#file=`/bin/ls -1 "$dir" | sort --random-sort | head -1`
file=`/bin/ls -p -R "$dir" | grep -v / | sort --random-sort | head -1`
path=`readlink --canonicalize "$dir/$file"` # Converts to usable full path
echo "The randomly-selected file is: $path" # Echo full file path for debugging
cp $path '$HOME/Pictures/glPlanet'
#echo $file
#echo " "
dir=""
file=""
path=""
#Ultrawide desktop
dir='$HOME/Pictures/ultrawide/'
#file=`/bin/ls -1 "$dir" | sort --random-sort | head -1`
file=`/bin/ls -p -R "$dir" | grep -v / | sort --random-sort | head -1`
path=`readlink --canonicalize "$dir/$file"` # Converts to usable full path
echo "The randomly-selected file is: $path" # Echo full file path for debugging
/bin/sleep 2
pcmanfm --desktop-off
/bin/sleep 2
cp $path '$HOME/Pictures/desktopultrawide'
nitrogen --set-auto '$HOME/Pictures/desktopultrawide'
#if [[date +%F%t%T]-[uptime -s]]<"3:00" then xscreensaver-demo;
#echo $file
#echo " "