OSDN Git Service

add padding and online/offline autostart trigger
authorpaperbenni <paperbenni@gmail.com>
Sat, 18 Jan 2020 16:56:42 +0000 (17:56 +0100)
committerpaperbenni <paperbenni@gmail.com>
Sat, 18 Jan 2020 16:56:42 +0000 (17:56 +0100)
autostart.sh
userinstall.sh

index 98997a8..ee7a94a 100755 (executable)
@@ -36,9 +36,23 @@ fi
 [ -e /home/benjamin/paperbenni/monitor.sh ] &&
        bash /home/benjamin/paperbenni/monitor.sh &
 
-# chrome os wallpaper changer
-[ -e "$HOME/instantos/wallpapers/wall.sh" ] &&
-       bash "$HOME/instantos/wallpapers/wall.sh" &
+onlinetrigger() {
+       [ -e "$HOME/instantos/wallpapers/wall.sh" ] && bash "$HOME/instantos/wallpapers/wall.sh"
+}
+
+if ping google.com -c 2; then
+       onlinetrigger
+else
+       [ -e "$HOME/instantos/wallpapers/offlinewall.sh" ] && bash "$HOME/instantos/wallpapers/offlinewall.sh"
+       for i in $(seq 10); do
+               if ping google.com -c 2; then
+                       onlinetrigger
+                       break
+               else
+                       sleep 10
+               fi
+       done
+fi
 
 # apply german keybpard layout
 if locale | grep -q 'de_DE'; then
@@ -110,7 +124,7 @@ while :; do
        [ -n "$ISLAPTOP" ] && addstatus "$BATTERY"
        addstatus "$INTERNET"
 
-       xsetroot -name "$date"
+       xsetroot -name "^f11^$date"
        date=""
 
        sleep 10
index bd21042..12b3274 100755 (executable)
@@ -32,7 +32,6 @@ if acpi | grep -q '[0-9]%' &>/dev/null; then
     touch .cache/islaptop
 fi
 
-
 cd
 
 # auto start script with instantWM
@@ -68,7 +67,8 @@ cd
 rm -rf instantos/wallpapers
 mkdir -p instantos/wallpapers
 curl -s "$RAW/instantOS/instantWALLPAPER/master/wall.sh" >instantos/wallpapers/wall.sh
-chmod +x instantos/wallpapers/wall.sh
+curl -s "$RAW/instantOS/instantWALLPAPER/master/offlinewall.sh" >instantos/wallpapers/offlinewall.sh
+chmod +x instantos/wallpapers/*.sh
 
 # set instantwm as default for lightdm
 echo '[Desktop]' >.dmrc