Skip to content

Commit

Permalink
Merge pull request #55 from MGRAFF2006/feh-background-fix
Browse files Browse the repository at this point in the history
feh fix
  • Loading branch information
ChrisTitusTech authored Aug 20, 2024
2 parents 96b18e7 + ef3dbf7 commit 27ea0d0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 13 deletions.
24 changes: 12 additions & 12 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ static const char *colors[][3] = {
};

static const char *const autostart[] = {
"sh -c", "xset s off", NULL,
"sh -c", "xset s noblank", NULL,
"sh -c", "xset -dpms", NULL,
"sh -c", "dbus-update-activation-environment --systemd --all", NULL,
"sh -c", "/usr/lib/mate-polkit/polkit-mate-authentication-agent-1", NULL,
"flameshot", NULL,
"dunst", NULL,
"picom", "-b", NULL,
"sh -c", "feh --randomize --bg-fill ~/Pictures/backgrounds/*", NULL,
"synergy", NULL,
"slstatus", NULL,
NULL /* terminate */
"xset", "s", "off", NULL,
"xset", "s", "noblank", NULL,
"xset", "-dpms", NULL,
"dbus-update-activation-environment", "--systemd", "--all", NULL,
"/usr/lib/mate-polkit/polkit-mate-authentication-agent-1", NULL,
"flameshot", NULL,
"dunst", NULL,
"picom", "-b", NULL,
"sh", "-c", "feh --randomize --bg-fill ~/Pictures/backgrounds/*", NULL,
"synergy", NULL,
"slstatus", NULL,
NULL /* terminate */
};

/* tagging */
Expand Down
34 changes: 33 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,43 @@ clone_config_folders() {
done
}

configure_backgrounds() {
# Set the variable BG_DIR to the path where backgrounds will be stored
BG_DIR="$HOME/Pictures/backgrounds"

# Check if the ~/Pictures directory exists
if [ ! -d "~/Pictures" ]; then
# If it doesn't exist, print an error message and return with a status of 1 (indicating failure)
echo "Pictures directory does not exist"
mkdir ~/Pictures
echo "Directory was created in Home folder"
fi

# Check if the backgrounds directory (BG_DIR) exists
if [ ! -d "$BG_DIR" ]; then
# If the backgrounds directory doesn't exist, attempt to clone a repository containing backgrounds
if ! git clone https://github.com/ChrisTitusTech/nord-background.git ~/Pictures; then
# If the git clone command fails, print an error message and return with a status of 1
echo "Failed to clone the repository"
return 1
fi
# Rename the cloned directory to 'backgrounds'
mv ~/Pictures/nord-background ~/Pictures/backgrounds
# Print a success message indicating that the backgrounds have been downloaded
echo "Downloaded desktop backgrounds to $BG_DIR"
else
# If the backgrounds directory already exists, print a message indicating that the download is being skipped
echo "Path $BG_DIR exists for desktop backgrounds, skipping download of backgrounds"
fi
}

# Call the function
clone_config_folders

# Call the function
picom_animations

echo "All dependencies installed successfully."
# Call the function
configure_backgrounds

echo "All dependencies installed successfully."

0 comments on commit 27ea0d0

Please sign in to comment.