Bladeren bron

[General] Create lvim.desktop (#1123)

UltimateOmega 4 jaren geleden
bovenliggende
commit
cb108adec4
3 gewijzigde bestanden met toevoegingen van 24 en 1 verwijderingen
  1. 13 0
      utils/desktop/lvim.desktop
  2. 9 0
      utils/installer/install.sh
  3. 2 1
      utils/installer/uninstall.sh

+ 13 - 0
utils/desktop/lvim.desktop

@@ -0,0 +1,13 @@
+[Desktop Entry]
+Name=LunarVim
+GenericName=Text Editor
+Comment=An IDE layer for Neovim with sane defaults. Completely free and community driven.
+TryExec=lvim
+Exec=lvim %F
+Terminal=false
+Type=Application
+Keywords=Text;editor;
+Icon=nvim
+Categories=Utility;TextEditor;
+StartupNotify=false
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;

+ 9 - 0
utils/installer/install.sh

@@ -226,5 +226,14 @@ else
 	# echo 'export PATH=$HOME/.config/lunarvim/utils/bin:$PATH' >>~/.bashrc
 fi
 
+if [ "$(uname)" != "Darwin" ]; then
+	if [ -e "$HOME/.local/share/applications/lvim.desktop" ]; then
+		echo 'Desktop file already available'
+	else
+		mkdir -p "$HOME/.local/share/applications"
+		cp "$HOME/.local/share/lunarvim/lvim/utils/desktop/lvim.desktop" "$HOME/.local/share/applications/lvim.desktop"
+	fi
+fi
+
 echo "I recommend you also install and activate a font from here: https://github.com/ryanoasis/nerd-fonts"
 # echo 'export PATH=/home/$USER/.config/lunarvim/utils/bin:$PATH appending to zshrc/bashrc'

+ 2 - 1
utils/installer/uninstall.sh

@@ -1,4 +1,5 @@
 #!/bin/sh
 
-rm -rf .local/share/lunarvim
+rm -rf ~/.local/share/lunarvim
 sudo rm /usr/local/bin/lvim
+rm -rf ~/.local/share/applications/lvim.desktop