mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-01-25 21:58:37 +01:00
improve wallsetter script
This commit is contained in:
parent
4f3ff41498
commit
7a053c5fb9
@ -1,19 +1,24 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "wallsetter" ''
|
pkgs.writeShellScriptBin "wallsetter" ''
|
||||||
WALLPAPER=$(find $HOME/Pictures/Wallpapers -type l | shuf -n 1)
|
TIMEOUT=5
|
||||||
PREVIOUS=$WALLPAPER
|
OSRELEASE=$(cat /etc/os-release | grep nixos | shuf -n 1)
|
||||||
|
FILETYPE="l"
|
||||||
TRANSITION1="--transition-type wave --transition-angle 120 --transition-step 30"
|
TRANSITION1="--transition-type wave --transition-angle 120 --transition-step 30"
|
||||||
TRANSITION2="--transition-type wipe --transition-angle 30 --transition-step 30"
|
TRANSITION2="--transition-type wipe --transition-angle 30 --transition-step 30"
|
||||||
TRANSITION3="--transition-type center --transition-step 30"
|
TRANSITION3="--transition-type center --transition-step 30"
|
||||||
TRANSITION4="--transition-type outer --transition-pos 0.3,0.8 --transition-step 30"
|
TRANSITION4="--transition-type outer --transition-pos 0.3,0.8 --transition-step 30"
|
||||||
TRANSITION5="--transition-type wipe --transition-angle 270 --transition-step 30"
|
TRANSITION5="--transition-type wipe --transition-angle 270 --transition-step 30"
|
||||||
|
|
||||||
|
[[ ! -z "$testvar" ]] && $FILETYPE="l" || $FILETYPE="f"
|
||||||
|
WALLPAPER=$(find $HOME/Pictures/Wallpapers -type $FILETYPE | shuf -n 1)
|
||||||
|
PREVIOUS=$WALLPAPER
|
||||||
|
|
||||||
while true;
|
while true;
|
||||||
do
|
do
|
||||||
if [ $WALLPAPER == $PREVIOUS ]
|
if [ $WALLPAPER == $PREVIOUS ]
|
||||||
then
|
then
|
||||||
WALLPAPER=$(find $HOME/Pictures/Wallpapers -type l | shuf -n 1)
|
WALLPAPER=$(find $HOME/Pictures/Wallpapers -type $FILETYPE | shuf -n 1)
|
||||||
else
|
else
|
||||||
PREVIOUS=$WALLPAPER
|
PREVIOUS=$WALLPAPER
|
||||||
NUM=$(shuf -i 1-5 -n 1)
|
NUM=$(shuf -i 1-5 -n 1)
|
||||||
@ -35,7 +40,7 @@ do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
${pkgs.swww}/bin/swww img $WALLPAPER $TRANSITION
|
${pkgs.swww}/bin/swww img $WALLPAPER $TRANSITION
|
||||||
sleep 120
|
sleep $TIMEOUT
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
|
Loading…
Reference in New Issue
Block a user