From af5d51ae9c5bfd9f56ccf8fbe37c61e66ce7eef6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 3 May 2025 09:38:46 +0200 Subject: [PATCH] Add function to remove the app --- defaults/bash/functions | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/defaults/bash/functions b/defaults/bash/functions index cc18744..eae6640 100644 --- a/defaults/bash/functions +++ b/defaults/bash/functions @@ -60,6 +60,21 @@ EOF chmod +x "$DESKTOP_FILE" } +web2app-remove() { + if [ "$#" -ne 1 ]; then + echo "Usage: web2app-remove " + 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'