mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-06-21 04:08:20 +02:00
Fixed wallsetter not accepting wallpapers with spaces
This commit is contained in:
parent
5419daba34
commit
96c8731c47
@ -1,23 +1,26 @@
|
|||||||
{ pkgs, username, wallpaperDir, wallpaperGit, ... }:
|
{ pkgs, username, wallpaperDir, wallpaperGit, ... }:
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "wallsetter" ''
|
pkgs.writeShellScriptBin "wallsetter" ''
|
||||||
TIMEOUT=720
|
TIMEOUT=5
|
||||||
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"
|
||||||
WALLPAPER=$(find ${wallpaperDir}/* -type f | shuf -n 1)
|
WALLPAPER=$(find $HOME/Pictures/Wallpapers/ -name '*' | awk '!/.git/' | tail -n +2 | sed 's/ /\\ /g' | shuf -n 1)
|
||||||
PREVIOUS=$WALLPAPER
|
PREVIOUS=$WALLPAPER
|
||||||
rm -rf ${wallpaperDir}
|
if [ -d ${wallpaperDir} ]; then
|
||||||
|
cd ${wallpaperDir}
|
||||||
|
git pull
|
||||||
|
else
|
||||||
${pkgs.git}/bin/git clone ${wallpaperGit} ${wallpaperDir}
|
${pkgs.git}/bin/git clone ${wallpaperGit} ${wallpaperDir}
|
||||||
sleep 1
|
|
||||||
chown -R ${username}:users ${wallpaperDir}
|
chown -R ${username}:users ${wallpaperDir}
|
||||||
|
fi
|
||||||
while true;
|
while true;
|
||||||
do
|
do
|
||||||
if [ $WALLPAPER == $PREVIOUS ]
|
if [ "$WALLPAPER" == "$PREVIOUS" ]
|
||||||
then
|
then
|
||||||
WALLPAPER=$(find ${wallpaperDir}/* -type f | shuf -n 1)
|
WALLPAPER=$(find $HOME/Pictures/Wallpapers/ -name '*' | awk '!/.git/' | tail -n +2 | sed 's/ /\\ /g' | shuf -n 1)
|
||||||
else
|
else
|
||||||
PREVIOUS=$WALLPAPER
|
PREVIOUS=$WALLPAPER
|
||||||
NUM=$(shuf -i 1-5 -n 1)
|
NUM=$(shuf -i 1-5 -n 1)
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
gitEmail = "tylerzanekelley@gmail.com";
|
gitEmail = "tylerzanekelley@gmail.com";
|
||||||
theLocale = "en_US.UTF-8";
|
theLocale = "en_US.UTF-8";
|
||||||
theTimezone = "America/Chicago";
|
theTimezone = "America/Chicago";
|
||||||
theme = "gruvbox-dark-medium";
|
theme = "tokyo-night-storm";
|
||||||
browser = "firefox";
|
browser = "firefox";
|
||||||
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
|
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
|
||||||
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user