Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save natp0ng/962ac496b2a19986ee2e1f0896e1ff53 to your computer and use it in GitHub Desktop.
Save natp0ng/962ac496b2a19986ee2e1f0896e1ff53 to your computer and use it in GitHub Desktop.
Cursor-Desktop-AutoUpdate-Handler.sh
#!/bin/bash
# Step 1: Confirm the path to the .AppImage file
APPIMAGE_PATH="$HOME/Applications/cursor-0.8.6.AppImage"
echo "Using AppImage path: $APPIMAGE_PATH"
# Step 1.5: Download the Cursor logo
ICON_PATH="$HOME/.local/share/icons/cursor-icon.svg"
curl -o $ICON_PATH "https://www.cursor.so/brand/icon.svg"
echo "Downloaded logo to: $ICON_PATH"
# Step 2: Create a .desktop file with necessary fields
DESKTOP_FILE_CONTENT="[Desktop Entry]
Type=Application
Name=Cursor
Exec=$APPIMAGE_PATH
Icon=$ICON_PATH
Categories=Utility;
"
echo "Generating .desktop content"
# Step 3: Save the .desktop file
DESKTOP_FILE_PATH="$HOME/.local/share/applications/cursor.desktop"
echo "$DESKTOP_FILE_CONTENT" > $DESKTOP_FILE_PATH
echo "Saved .desktop file at: $DESKTOP_FILE_PATH"
# Step 4: Make it executable
chmod +x $DESKTOP_FILE_PATH
echo "Made the .desktop file executable"
# Done
echo "All set, Cursor should now be available in your app launcher with a fancy icon."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment