diff options
| -rwxr-xr-x | auto-update.sh.old (renamed from auto-update.sh) | 1 | ||||
| -rwxr-xr-x | idle.sh | 13 | ||||
| -rw-r--r-- | logs/backgroundblur.log | 15 | ||||
| -rw-r--r-- | logs/wallpapertrans.log | 8 | ||||
| -rwxr-xr-x | runbgblur.sh | 5 | ||||
| -rwxr-xr-x | runtransani.sh | 2 | ||||
| -rwxr-xr-x | update.sh | 3 |
7 files changed, 43 insertions, 4 deletions
diff --git a/auto-update.sh b/auto-update.sh.old index a2b6581..1a8e240 100755 --- a/auto-update.sh +++ b/auto-update.sh.old @@ -5,7 +5,6 @@ while true; do if [[ "$(systemctl is-system-running)" == "running" || "$(systemctl is-system-running)" == "degraded" ]]; then if [[ "$(xprintidle)" -gt 600000 ]]; then # Changed from 600000 (10 minutes) to 3600000 (1 hour) #sudo #exec sudo /usr/bin/reflector @/etc/xdg/reflector/reflector.conf & - touch /home/system/updated-via-auto-update notify-send "Auto-Updater" "Update in progress, please don't poweroff the computer" && sudo npm update -g & nix-env -u & brew update & yay -Sl > /tmp/yaySl & yay -Syu --noconfirm --disable-download-timeout && flatpak update -y && notify-send -u low "Auto-Updater" "Update Successfully!" && echo \#sleep 3600 || notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all else sleep 60 @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + + +while true; do + if [[ "$(systemctl is-system-running)" == "running" || "$(systemctl is-system-running)" == "degraded" ]]; then + if [[ "$(xprintidle)" -gt 600000 ]]; then # Changed from 600000 (10 minutes) to 3600000 (1 hour) + exec $HOME/scripts/auto-update.sh & + killall picom; bspcomp & + else + sleep 60 + fi + fi +done diff --git a/logs/backgroundblur.log b/logs/backgroundblur.log new file mode 100644 index 0000000..6117c4c --- /dev/null +++ b/logs/backgroundblur.log @@ -0,0 +1,15 @@ +脚本启动于 2023-05-28 13:57:19+08:00 [COMMAND="/home/system/.config/bspwm/scripts/backgroundblur -i '/home/system/Pictures/wallpapers/jrajala_steam_fog.jpg' " TERM="alacritty" TTY="/dev/pts/1" COLUMNS="88" LINES="24"] +[2023-05-28T13:57:19+0800]: /home/system/Pictures/wallpapers/jrajala_steam_fog.jpg
+[2023-05-28T13:57:19+0800]: /home/system/.cache/wallblur
+[2023-05-28T13:57:20+0800]: Display resolution is: 1920x1080
+[2023-05-28T13:57:20+0800]: Wallpaper resolution is: 7952x5304
+[2023-05-28T13:57:20+0800]: Scaling wallpaper to match resolution
+[2023-05-28T13:57:20+0800]: > Generating jrajala_steam_fog0.jpg
+[2023-05-28T13:57:20+0800]: > Generating jrajala_steam_fog1.jpg
+[2023-05-28T13:57:21+0800]: > Generating jrajala_steam_fog2.jpg
+[2023-05-28T13:57:21+0800]: > Generating jrajala_steam_fog3.jpg
+[2023-05-28T13:57:21+0800]: > Generating jrajala_steam_fog4.jpg
+[2023-05-28T13:57:21+0800]: > Generating jrajala_steam_fog5.jpg
+[2023-05-28T13:57:21+0800]: ! Blurring
+^C +脚本完成于 2023-05-28 13:57:23+08:00 [COMMAND_EXIT_CODE="130"] diff --git a/logs/wallpapertrans.log b/logs/wallpapertrans.log new file mode 100644 index 0000000..aee5143 --- /dev/null +++ b/logs/wallpapertrans.log @@ -0,0 +1,8 @@ +脚本启动于 2023-05-28 13:57:43+08:00 [COMMAND="/home/system/.config/bspwm/scripts/wallpapertrans.sh" <not executed on terminal>] +0
+ +脚本完成于 2023-05-28 13:57:46+08:00 [COMMAND_EXIT_CODE="0"] +脚本启动于 2023-05-28 14:27:46+08:00 [COMMAND="/home/system/.config/bspwm/scripts/wallpapertrans.sh" <not executed on terminal>] +0
+ +脚本完成于 2023-05-28 14:27:50+08:00 [COMMAND_EXIT_CODE="0"] diff --git a/runbgblur.sh b/runbgblur.sh index 26ad5bd..8671c24 100755 --- a/runbgblur.sh +++ b/runbgblur.sh @@ -2,8 +2,9 @@ while true; do pkill -f backgroundblur - wallpaper="$(find /home/system/Pictures/wallpapers -type f -name '*.jpg' -o -name '*.png' | shuf -n 1)" + wallpaper="$(find /home/system/Pictures/wallpapers -type f -name '*.jpg' -o -name '*.png' | shuf -n 1)" feh --bg-fill "$wallpaper" & - $HOME/.config/bspwm/scripts/backgroundblur -i "$wallpaper" & + #script -c "$HOME/.config/bspwm/scripts/backgroundblur -i '$wallpaper' " -a ~/scripts/logs/backgroundblur.log --force & + $HOME/.config/bspwm/scripts/backgroundblur -i '$wallpaper' sleep 1800 done diff --git a/runtransani.sh b/runtransani.sh index 2420580..b803641 100755 --- a/runtransani.sh +++ b/runtransani.sh @@ -3,7 +3,7 @@ while true; do #wallpaper="$(find /home/system/Pictures/wallpapers -type f -name '*.jpg' -o -name '*.png' | shuf -n 1)" #cp $wallpaper $HOME/.wallpaper/old.jpg - $HOME/.config/bspwm/scripts/wallpapertrans.sh + script -c "$HOME/.config/bspwm/scripts/wallpapertrans.sh" $HOME/scripts/logs/wallpapertrans.log -a --force #feh --bg-fill $wallpaper # restart sleep 1800 diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..7100644 --- /dev/null +++ b/update.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +notify-send "Auto-Updater" "Update in progress, please don't poweroff the computer" && sudo npm update -g & nix-env -u & brew update & yay -Sl > /tmp/yaySl & yay -Syu --noconfirm --disable-download-timeout && flatpak update -y && notify-send -u low "Auto-Updater" "Update Successfully!" && echo \#sleep 3600 || notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all |
