Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
2b1e910d0b | 9 months ago |
|
96194f524b | 9 months ago |
|
d50e3774ef | 9 months ago |
|
205f22c6a3 | 9 months ago |
@ -0,0 +1,6 @@
|
|||||||
|
# How to download Wallify ?
|
||||||
|
|
||||||
|
Due to the fact that Gitea cannot take files larger than 4MB, you will just need to copy the following file via this command:
|
||||||
|
```sh
|
||||||
|
cp /home/UCA/machirat1/public/Wallify/Wallify.AppImage ~/bin/Wallify.AppImage
|
||||||
|
```
|
@ -1,112 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# ▄█ █▄ ▄████████ ▄█ ▄█ ▄█ ▄████████ ▄██ ▄
|
|
||||||
# ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ██▄
|
|
||||||
# ███ ███ ███ ███ ███ ███ ███▌ ███ █▀ ███▄▄▄███
|
|
||||||
# ███ ███ ███ ███ ███ ███ ███▌ ▄███▄▄▄ ▀▀▀▀▀▀███
|
|
||||||
# ███ ███ ▀███████████ ███ ███ ███▌ ▀▀███▀▀▀ ▄██ ███
|
|
||||||
# ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
|
|
||||||
# ███ ▄█▄ ███ ███ ███ ███▌ ▄ ███▌ ▄ ███ ███ ███ ███
|
|
||||||
# ▀███▀███▀ ███ █▀ █████▄▄██ █████▄▄██ █▀ ███ ▀█████▀
|
|
||||||
# ▀ ▀
|
|
||||||
|
|
||||||
# help()
|
|
||||||
#
|
|
||||||
# Print the help message
|
|
||||||
function help() {
|
|
||||||
echo "Usage: $0 [-h | -c | --uninstall]"
|
|
||||||
echo ""
|
|
||||||
echo "-h, --help Show this help"
|
|
||||||
echo "-c, --config Start the setup process"
|
|
||||||
echo "--uninstall Uninstall the software"
|
|
||||||
}
|
|
||||||
|
|
||||||
# uninstall()
|
|
||||||
#
|
|
||||||
# Uninstall Wallify. This function will remove the autostart file,
|
|
||||||
# the configuration file and the configuration directory.
|
|
||||||
function uninstall() {
|
|
||||||
start_time=$(date +%s%3N)
|
|
||||||
|
|
||||||
echo "Uninstalling..."
|
|
||||||
if [ -f ~/.config/autostart/wallify.sh.desktop ]; then
|
|
||||||
rm -f ~/.config/autostart/wallify.sh.desktop
|
|
||||||
else
|
|
||||||
echo "Error: ~/.config/autostart/wallify.sh.desktop does not exist."
|
|
||||||
fi
|
|
||||||
if [ -d ~/.config/Wallify ]; then
|
|
||||||
rm -rf ~/.config/Wallify
|
|
||||||
else
|
|
||||||
echo "Error: ~/.config/Wallify does not exist."
|
|
||||||
fi
|
|
||||||
echo "Done."
|
|
||||||
|
|
||||||
end_time=$(date +%s%3N)
|
|
||||||
duration=$((end_time - start_time))
|
|
||||||
echo "Uninstallation took $duration milliseconds."
|
|
||||||
}
|
|
||||||
|
|
||||||
# config()
|
|
||||||
#
|
|
||||||
# This function is used to configure Wallify. It will ask the user to select
|
|
||||||
# a wallpaper file and then create a configuration file, a start script and an
|
|
||||||
# autostart file. The configuration file will be saved in
|
|
||||||
# `~/.config/Wallify/wallpaper.conf` and will contain the path of the selected
|
|
||||||
# wallpaper. The start script will be saved in
|
|
||||||
# `~/.config/Wallify/start.sh` and will contain the command to launch the
|
|
||||||
# wallpaper with the selected options. The autostart file will be saved in
|
|
||||||
# `~/.config/autostart/wallify.sh.desktop` and will contain the command to launch
|
|
||||||
# the start script on startup.
|
|
||||||
function config() {
|
|
||||||
USER=$(whoami)
|
|
||||||
WALLPAPER_FILE=$(zenity --file-selection --title="Wallify - Select a wallpaper" --filename="" 2>/dev/null)
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Selected file: $WALLPAPER_FILE"
|
|
||||||
if [ -f "$WALLPAPER_FILE" ]; then
|
|
||||||
echo "+ Creating configuration directory"
|
|
||||||
mkdir -p ~/.config/Wallify
|
|
||||||
echo "+ Creating configuration file"
|
|
||||||
echo "WALLPAPER_FILE=$WALLPAPER_FILE" > ~/.config/Wallify/wallpaper.conf
|
|
||||||
echo "+ Creating start.sh script"
|
|
||||||
cat > ~/.config/Wallify/start.sh <<EOF
|
|
||||||
#!/bin/bash
|
|
||||||
user=$(whoami)
|
|
||||||
|
|
||||||
sleep 2
|
|
||||||
WALLPAPER_FILE=$(cat ~/.config/Wallify/wallpaper.conf | grep WALLPAPER_FILE | cut -d '=' -f2)
|
|
||||||
gsettings set org.gnome.desktop.background picture-uri file://$WALLPAPER_FILE
|
|
||||||
/home/UCA/machirat1/public/WallPaper/wallify -ni -fs -s -sp -st -b -nf -- mpv -wid WID --loop --no-audio $WALLPAPER_FILE &
|
|
||||||
EOF
|
|
||||||
chmod +x /home/UCA/$USER/.config/Wallify/start.sh
|
|
||||||
echo "+ Creating autostart file"
|
|
||||||
cat > ~/.config/autostart/wallify.sh.desktop <<EOF
|
|
||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Type=Application
|
|
||||||
Name=Wallify
|
|
||||||
Exec=/home/UCA/$USER/.config/Wallify/start.sh
|
|
||||||
Comment=Wallify
|
|
||||||
EOF
|
|
||||||
echo "Setup complete. You can restart your session to apply the changes."
|
|
||||||
else
|
|
||||||
zenity --error --text="Selected file is not a valid file"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
zenity --error --text="No file selected"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
-h|--help)
|
|
||||||
help
|
|
||||||
;;
|
|
||||||
-c|--config)
|
|
||||||
config
|
|
||||||
;;
|
|
||||||
--uninstall)
|
|
||||||
uninstall
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
help
|
|
||||||
;;
|
|
||||||
esac
|
|
Loading…
Reference in new issue