feat(uninstaller): desktop entry

feat(uninstaller): desktop entry
This commit is contained in:
opalmay 2022-10-10 02:23:29 +03:00 committed by GitHub
parent 523bafacb6
commit 4fa96e8e79
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,12 +60,23 @@ function remove_lvim_bin() {
rm -f "$lvim_bin" rm -f "$lvim_bin"
} }
function remove_desktop_file() {
OS="$(uname -s)"
# TODO: Any other OSes that use desktop files?
[ "$OS" != "Linux" ] && return
echo "Removing desktop file..."
find "$XDG_DATA_HOME/icons/hicolor" -name "lvim.svg" -type f -delete
rm "$XDG_DATA_HOME/applications/lvim.desktop"
}
function main() { function main() {
parse_arguments "$@" parse_arguments "$@"
echo "Removing LunarVim binary..." echo "Removing LunarVim binary..."
remove_lvim_bin remove_lvim_bin
echo "Removing LunarVim directories..." echo "Removing LunarVim directories..."
remove_lvim_dirs remove_lvim_dirs
remove_desktop_file
echo "Uninstalled LunarVim!" echo "Uninstalled LunarVim!"
} }