Add function to remove the app

This commit is contained in:
David Heinemeier Hansson
2025-05-03 09:38:46 +02:00
parent 08667ad313
commit af5d51ae9c

View File

@@ -60,6 +60,21 @@ EOF
chmod +x "$DESKTOP_FILE"
}
web2app-remove() {
if [ "$#" -ne 1 ]; then
echo "Usage: web2app-remove <AppName>"
return 1
fi
local APP_NAME="$1"
local ICON_DIR="$HOME/.local/share/applications/icons"
local DESKTOP_FILE="$HOME/.local/share/applications/${APP_NAME}.desktop"
local ICON_PATH="${ICON_DIR}/${APP_NAME}.png"
rm "$DESKTOP_FILE"
rm "$ICON_PATH"
}
# Ensure that external keyboards that use an fn key has the F keys as the default
alias fix_fkeys='echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode'