#!/bin/bash

# Set variables
APP_NAME="deltachat"  # Shorter name for the link
BIN_LINK="/opt/deltachat/deltachat-desktop"
CONFIG="$HOME/.config/DeltaChat"
mkdir -p $CONFIG
cp ./delta.png $CONFIG

# Create the desktop file
cat > "/home/$USER/.local/share/applications/$APP_NAME.desktop" <<EOF
[Desktop Entry]
Name=Delta Chat
Comment=Delta Chat
Exec=$BIN_LINK --no-sandbox
Icon=$CONFIG/delta.png
Terminal=false
Type=Application
Categories=Network;Messaging;
EOF

echo "Installation complete!"
