mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2024-12-26 07:08:51 +01: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.writeShellScriptBin "wallsetter" ''
|
||||
TIMEOUT=720
|
||||
TIMEOUT=5
|
||||
TRANSITION1="--transition-type wave --transition-angle 120 --transition-step 30"
|
||||
TRANSITION2="--transition-type wipe --transition-angle 30 --transition-step 30"
|
||||
TRANSITION3="--transition-type center --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"
|
||||
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
|
||||
rm -rf ${wallpaperDir}
|
||||
${pkgs.git}/bin/git clone ${wallpaperGit} ${wallpaperDir}
|
||||
sleep 1
|
||||
chown -R ${username}:users ${wallpaperDir}
|
||||
if [ -d ${wallpaperDir} ]; then
|
||||
cd ${wallpaperDir}
|
||||
git pull
|
||||
else
|
||||
${pkgs.git}/bin/git clone ${wallpaperGit} ${wallpaperDir}
|
||||
chown -R ${username}:users ${wallpaperDir}
|
||||
fi
|
||||
while true;
|
||||
do
|
||||
if [ $WALLPAPER == $PREVIOUS ]
|
||||
if [ "$WALLPAPER" == "$PREVIOUS" ]
|
||||
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
|
||||
PREVIOUS=$WALLPAPER
|
||||
NUM=$(shuf -i 1-5 -n 1)
|
||||
|
@ -20,7 +20,7 @@
|
||||
gitEmail = "tylerzanekelley@gmail.com";
|
||||
theLocale = "en_US.UTF-8";
|
||||
theTimezone = "America/Chicago";
|
||||
theme = "gruvbox-dark-medium";
|
||||
theme = "tokyo-night-storm";
|
||||
browser = "firefox";
|
||||
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
|
||||
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
||||
|
Loading…
Reference in New Issue
Block a user