cat > install.sh << 'EOF'
#!/bin/bash
echo "Installing NCNotes Editor..."

mkdir -p ~/.local/bin
mkdir -p ~/.local/share/icons
mkdir -p ~/.local/share/applications

cp NCNotesEditor.AppImage ~/.local/bin/NCNotesEditor.AppImage
chmod +x ~/.local/bin/NCNotesEditor.AppImage

cp ncnotes.png ~/.local/share/icons/ncnotes.png

cat > ~/.local/share/applications/ncnotes.desktop << DESKTOP
[Desktop Entry]
Name=NCNotes Editor
Exec=$HOME/.local/bin/NCNotesEditor.AppImage
Icon=$HOME/.local/share/icons/ncnotes.png
Type=Application
Categories=Utility;
DESKTOP

update-desktop-database ~/.local/share/applications/
echo "Done! Search for NCNotes Editor in your apps."
EOF
chmod +x install.sh