From 5f8aee7fc7e2795f85b03bb332f6216188043348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kn=C3=BCttel?= Date: Mon, 1 Mar 2021 16:02:35 +0100 Subject: [PATCH] enhanced installation process --- install_nvim.sh => install/install_nvim.sh | 19 +++++ install/nvim.desktop | 81 ++++++++++++++++++++++ install/nvim.svg | 27 ++++++++ 3 files changed, 127 insertions(+) rename install_nvim.sh => install/install_nvim.sh (50%) create mode 100755 install/nvim.desktop create mode 100644 install/nvim.svg diff --git a/install_nvim.sh b/install/install_nvim.sh similarity index 50% rename from install_nvim.sh rename to install/install_nvim.sh index e035921..b290fb6 100755 --- a/install_nvim.sh +++ b/install/install_nvim.sh @@ -1,6 +1,10 @@ #!/bin/bash installdir="$HOME/.local/bin" +applications_dir="$HOME/.local/share/applications" +icon_dir="$HOME/.local/share/icons" +orig_dir=$( pwd ) + echo "install directory is $installdir" if [ ! -d $installdir ]; then @@ -15,6 +19,21 @@ wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage || echo "done." chmod +x nvim.appimage +echo "Setting up nvim for GNOME." +echo "This part is optional since it might fail." +cd $orig_dir +echo "copying icon..." +cp nvim.svg $icon_dir +echo "copying .desktop..." +cp nvim.desktop $applications_dir + +echo "You might have to update $applications_dir/nvim.desktop." +echo "Probably because your user name is different." +echo "Also you should set nvim as the handler for all the mimetypes:" +echo " xdg-mime default nvim.desktop 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++ text/x-python" +echo "" + + echo "The neovim appimage has been downloaded into $installdir." echo "It has been marked as executable, you can now run $installdir/nvim.appimage." echo "You should add an alias into your shrc:" diff --git a/install/nvim.desktop b/install/nvim.desktop new file mode 100755 index 0000000..d62e295 --- /dev/null +++ b/install/nvim.desktop @@ -0,0 +1,81 @@ +[Desktop Entry] +Name=Neovim +GenericName=Text Editor +GenericName[de]=Texteditor +Comment=Edit text files +Comment[af]=Redigeer tekslêers +Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ +Comment[ar]=حرّر ملفات نصية +Comment[az]=Mətn fayllarını redaktə edin +Comment[be]=Рэдагаваньне тэкставых файлаў +Comment[bg]=Редактиране на текстови файлове +Comment[bn]=টেক্স্ট ফাইল এডিট করুন +Comment[bs]=Izmijeni tekstualne datoteke +Comment[ca]=Edita fitxers de text +Comment[cs]=Úprava textových souborů +Comment[cy]=Golygu ffeiliau testun +Comment[da]=Redigér tekstfiler +Comment[de]=Textdateien bearbeiten +Comment[el]=Επεξεργασία αρχείων κειμένου +Comment[en_CA]=Edit text files +Comment[en_GB]=Edit text files +Comment[es]=Edita archivos de texto +Comment[et]=Redigeeri tekstifaile +Comment[eu]=Editatu testu-fitxategiak +Comment[fa]=ویرایش پرونده‌های متنی +Comment[fi]=Muokkaa tekstitiedostoja +Comment[fr]=Édite des fichiers texte +Comment[ga]=Eagar comhad Téacs +Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો +Comment[he]=ערוך קבצי טקסט +Comment[hi]=पाठ फ़ाइलें संपादित करें +Comment[hr]=Uređivanje tekstualne datoteke +Comment[hu]=Szövegfájlok szerkesztése +Comment[id]=Edit file teks +Comment[it]=Modifica file di testo +Comment[ja]=テキストファイルを編集します +Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು +Comment[ko]=텍스트 파일을 편집합니다 +Comment[lt]=Redaguoti tekstines bylas +Comment[lv]=Rediģēt teksta failus +Comment[mk]=Уреди текстуални фајлови +Comment[ml]=വാചക രചനകള് തിരുത്തുക +Comment[mn]=Текст файл боловсруулах +Comment[mr]=गद्य फाइल संपादित करा +Comment[ms]=Edit fail teks +Comment[nb]=Rediger tekstfiler +Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस् +Comment[nl]=Tekstbestanden bewerken +Comment[nn]=Rediger tekstfiler +Comment[no]=Rediger tekstfiler +Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ +Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ +Comment[pl]=Edytor plików tekstowych +Comment[pt]=Editar ficheiros de texto +Comment[pt_BR]=Edite arquivos de texto +Comment[ro]=Editare fişiere text +Comment[ru]=Редактор текстовых файлов +Comment[sk]=Úprava textových súborov +Comment[sl]=Urejanje datotek z besedili +Comment[sq]=Përpuno files teksti +Comment[sr]=Измени текстуалне датотеке +Comment[sr@Latn]=Izmeni tekstualne datoteke +Comment[sv]=Redigera textfiler +Comment[ta]=உரை கோப்புகளை தொகுக்கவும் +Comment[th]=แก้ไขแฟ้มข้อความ +Comment[tk]=Metin faýllary editle +Comment[tr]=Metin dosyalarını düzenle +Comment[uk]=Редактор текстових файлів +Comment[vi]=Soạn thảo tập tin văn bản +Comment[wa]=Asspougnî des fitchîs tecses +Comment[zh_CN]=编辑文本文件 +Comment[zh_TW]=編輯文字檔 +TryExec=/home/daniel/.local/bin/nvim.appimage +Exec=gnome-terminal -e "/home/daniel/.local/bin/nvim.appimage %F" +Terminal=true +Type=Application +Keywords=Text;editor; +Icon=/home/daniel/.local/share/icons/nvim.svg +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++; diff --git a/install/nvim.svg b/install/nvim.svg new file mode 100644 index 0000000..46c5eb8 --- /dev/null +++ b/install/nvim.svg @@ -0,0 +1,27 @@ + + + neovim-mark@2x + Created with Sketch (http://www.bohemiancoding.com/sketch) + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file