diff options
author | Matthieu Coudron <mattator@gmail.com> | 2017-01-24 16:11:21 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-01-31 02:02:09 +0100 |
commit | 7c836573977e5e86962cdb346b8537b78a36eb90 (patch) | |
tree | f63d872654d5859938cad82951fb0b2298420ce6 | |
parent | bdfa1479d296bbc734abc60be1544eb72d315325 (diff) | |
download | rneovim-7c836573977e5e86962cdb346b8537b78a36eb90.tar.gz rneovim-7c836573977e5e86962cdb346b8537b78a36eb90.tar.bz2 rneovim-7c836573977e5e86962cdb346b8537b78a36eb90.zip |
dist: runtime/nvim.desktop
Closes #3689
cmake: Add `desktop-install` and `icon-install` targets. `runtime`
target will trigger them.
Specification:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys
Icons are stored system-wide in /usr/share/applications or user wide at
/usr/share/icons/hicolor/scalable/apps and can be overriden in ~/.local/share/icons
nvim.desktop file can be installed system wide or in
~/.local/share/applications/
To test without an installer:
$ xdg-desktop-menu install --novendor runtime/nvim.desktop
$ xdg-icon-resource install --novendor --mode user --size 64 contrib/nvim-icon.png
Once it is installed, you can test with gtk-launch if installed or
dmenu/rofi (drun mode)
-rw-r--r-- | runtime/CMakeLists.txt | 14 | ||||
-rw-r--r-- | runtime/nvim.desktop | 81 | ||||
-rw-r--r-- | runtime/nvim.png | bin | 0 -> 6432 bytes | |||
-rw-r--r-- | src/nvim/version.c | 2 |
4 files changed, 96 insertions, 1 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index cced1a8d04..69498dc1a1 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -100,6 +100,20 @@ add_custom_target( ${GENERATED_PACKAGE_TAGS} ) +# Optional targets for nvim.desktop file and icon. +find_program(XDG_MENU_PRG xdg-desktop-menu) +find_program(XDG_ICON_PRG xdg-icon-resource) +if(XDG_MENU_PRG) + add_custom_target(desktop-file + COMMAND xdg-desktop-menu install --novendor ${PROJECT_SOURCE_DIR}/runtime/nvim.desktop) + # add_dependencies(runtime desktop-file) +endif() +if(XDG_ICON_PRG) + add_custom_target(desktop-icon + COMMAND xdg-icon-resource install --novendor --size 128 ${PROJECT_SOURCE_DIR}/runtime/nvim.png) + # add_dependencies(runtime desktop-icon) +endif() + # CMake is painful here. It will create the destination using the user's # current umask, and we don't want that. And we don't just want to install # the target directory, as it will mess with existing permissions. So this diff --git a/runtime/nvim.desktop b/runtime/nvim.desktop new file mode 100644 index 0000000000..be6a2eda82 --- /dev/null +++ b/runtime/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=nvim +Exec=nvim %F +Terminal=true +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++; diff --git a/runtime/nvim.png b/runtime/nvim.png Binary files differnew file mode 100644 index 0000000000..dbc65ef363 --- /dev/null +++ b/runtime/nvim.png diff --git a/src/nvim/version.c b/src/nvim/version.c index 9cf509ca23..a12621d06f 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -1537,7 +1537,7 @@ static int included_patches[] = { // 907 NA // 906 NA // 905 NA - // 904 NA + 904, 903, // 902 NA 901, |