Last active
March 18, 2025 08:45
-
-
Save emepetres/62f809fe2636015ac53798d82bf67f3b to your computer and use it in GitHub Desktop.
Remove Cursor AI titlebar in Gnome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
## Script to remove titlebar in Cursor on Gnome (based on https://github.com/getcursor/cursor/issues/837#issuecomment-2614109807) | |
APP_IMAGE=/opt/cursor-bin/cursor-bin.AppImage | |
BUILD_PATH=./patch-cursor | |
mkdir $BUILD_PATH | |
pushd $BUILD_PATH | |
# Extract the AppImage | |
cp $APP_IMAGE ./cursor.AppImage | |
./cursor.AppImage --appimage-extract | |
rm ./cursor.AppImage | |
# Fix it by replacing all occurrences of ",minHeight" with ",frame:false,minHeight" | |
find squashfs-root/ -type f -name '*.js' \ | |
-exec grep -l ,minHeight {} \; \ | |
-exec sed -i 's/,minHeight/,frame:false,minHeight/g' {} \; | |
# Download appimagetool | |
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O ./appimagetool-x86_64.AppImage | |
chmod +x ./appimagetool-x86_64.AppImage | |
# Repackage the AppImage using appimagetool | |
./appimagetool-x86_64.AppImage squashfs-root/ | |
# Create a backup and replace the AppImage | |
sudo mv $APP_IMAGE $APP_IMAGE.bck | |
sudo cp ./Cursor-x86_64.AppImage $APP_IMAGE | |
# Cleaning Up | |
popd | |
rm -rf $BUILD_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
awesome