Update background image path and implement error handling

This commit is contained in:
exu 2024-05-18 09:23:30 +02:00
parent d8013f7d18
commit ab9dc96d44

View File

@ -329,11 +329,15 @@ fi
# chmod +x ~/.fehbg # chmod +x ~/.fehbg
# copy chosen image for lockscreen and desktop # copy chosen image for lockscreen and desktop
backgroundimage="/home/exu/Bilder/Backgrounds/artstation/dk-lan/artstation_14224733_55806391_月半与鬼哭.jpg" backgroundimage="/home/exu/Bilder/Art/artstation/dk-lan/artstation_14224733_55806391_月半与鬼哭.jpg"
mkdir -p "$HOME/.cache/backgrounds" mkdir -p "$HOME/.cache/backgrounds"
if [ -f "$backgroundimage" ]; then
cp "$backgroundimage" "$HOME/.cache/backgrounds/desktop" cp "$backgroundimage" "$HOME/.cache/backgrounds/desktop"
cp "$backgroundimage" "$HOME/.cache/backgrounds/lockscreen" cp "$backgroundimage" "$HOME/.cache/backgrounds/lockscreen"
else
printf "\033[38;2;200;20;20mCouldn't find background image\n\033[0m"
fi
chmod +x "$HOME/scripts/gsettings.sh" chmod +x "$HOME/scripts/gsettings.sh"
bash "$HOME/scripts/gsettings.sh" bash "$HOME/scripts/gsettings.sh"