From 4fa96e8e791a54c7d474e6f6cc6735bb5694765b Mon Sep 17 00:00:00 2001 From: opalmay <65673442+opalmay@users.noreply.github.com> Date: Mon, 10 Oct 2022 02:23:29 +0300 Subject: [PATCH] feat(uninstaller): desktop entry feat(uninstaller): desktop entry --- utils/installer/uninstall.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/utils/installer/uninstall.sh b/utils/installer/uninstall.sh index 8fc8e693..16d3c365 100755 --- a/utils/installer/uninstall.sh +++ b/utils/installer/uninstall.sh @@ -60,12 +60,23 @@ function remove_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() { parse_arguments "$@" echo "Removing LunarVim binary..." remove_lvim_bin echo "Removing LunarVim directories..." remove_lvim_dirs + remove_desktop_file echo "Uninstalled LunarVim!" }