aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Morales2015-07-25 15:51:43 -0300
committerFelipe Morales2015-07-25 15:51:43 -0300
commit15b3a1dadab1a6a20c93484a8694d0f9b6ba0442 (patch)
tree3e54c7e5f8b8fb44cd5615f480755780a2160d54
downloadaur-15b3a1dadab1a6a20c93484a8694d0f9b6ba0442.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD22
-rw-r--r--neovim.desktop11
-rw-r--r--neovim.svg240
-rwxr-xr-xnvim-wrapper18
5 files changed, 310 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f7be31926402
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = neovim-gnome-terminal-wrapper
+ pkgdesc = A wrapper for running neovim in a separate instance of gnome-terminal
+ pkgver = 1
+ pkgrel = 1
+ url = http://github.com/fmoralesc/
+ arch = any
+ license = GPL
+ depends = python-dbus
+ depends = neovim-git
+ depends = gnome-terminal
+ source = neovim.desktop
+ source = nvim-wrapper
+ source = neovim.svg
+ md5sums = 9833885822ad32f62eec455fd60a5fe1
+ md5sums = 345fa48dcf47a6143034f2b1deed20d1
+ md5sums = 2b271742492f200bcac78dbfe33caa3c
+
+pkgname = neovim-gnome-terminal-wrapper
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e3069779a04a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,22 @@
+# Maintainer: Felipe Morales <hel.sheep@gmail.com>
+pkgname=neovim-gnome-terminal-wrapper
+pkgver=1
+pkgrel=1
+pkgdesc="A wrapper for running neovim in a separate instance of gnome-terminal"
+arch=(any)
+url="http://github.com/fmoralesc/"
+license=('GPL')
+groups=()
+depends=('python-dbus' 'neovim-git' 'gnome-terminal')
+source=(neovim.desktop nvim-wrapper neovim.svg)
+md5sums=('9833885822ad32f62eec455fd60a5fe1' '345fa48dcf47a6143034f2b1deed20d1' '2b271742492f200bcac78dbfe33caa3c')
+
+
+package() {
+ cd "$srcdir/"
+ install -Dm755 nvim-wrapper "$pkgdir/usr/bin/nvim-wrapper"
+ install -Dm644 neovim.desktop "$pkgdir/usr/share/applications/neovim.desktop"
+ install -Dm644 neovim.svg "$pkgdir/usr/share/icons/neovim.svg"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/neovim.desktop b/neovim.desktop
new file mode 100644
index 000000000000..f298418c8176
--- /dev/null
+++ b/neovim.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Neovim
+Icon=neovim
+Exec=nvim-wrapper %F
+NoDisplay=false
+Categories=X-GNOME-Other;
+StartupNotify=false
+Terminal=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/neovim.svg b/neovim.svg
new file mode 100644
index 000000000000..0b5542999bc3
--- /dev/null
+++ b/neovim.svg
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ id="svg4230"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="neovim.svg">
+ <defs
+ id="defs4232">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4708">
+ <stop
+ style="stop-color:#47b73d;stop-opacity:1"
+ offset="0"
+ id="stop4710" />
+ <stop
+ style="stop-color:#ade355;stop-opacity:1"
+ offset="1"
+ id="stop4712" />
+ </linearGradient>
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="1007.3748"
+ x2="29.109528"
+ y1="1049.3851"
+ x1="29.109528"
+ id="linearGradient4101"
+ xlink:href="#linearGradient4708"
+ inkscape:collect="always"
+ gradientTransform="translate(-1.0986328e-6,3.4009766e-5)" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(0.46142398,2.1672042)"
+ x1="167.95833"
+ y1="-0.46142398"
+ x2="167.95833"
+ y2="335.45523"
+ id="linearGradient-1">
+ <stop
+ stop-color="#16B0ED"
+ stop-opacity="0.800235524"
+ offset="0%"
+ id="stop9" />
+ <stop
+ stop-color="#0F59B2"
+ stop-opacity="0.83700023"
+ offset="100%"
+ id="stop11" />
+ </linearGradient>
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(0.46586797,2.1465309)"
+ x1="1118.3426"
+ y1="-0.46586797"
+ x2="1118.3426"
+ y2="338.68602"
+ id="linearGradient-2">
+ <stop
+ stop-color="#7DB643"
+ offset="0%"
+ id="stop14" />
+ <stop
+ stop-color="#367533"
+ offset="100%"
+ id="stop16" />
+ </linearGradient>
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(0.84189739,1.1877932)"
+ x1="356.33796"
+ y1="0"
+ x2="356.33796"
+ y2="612.9013"
+ id="linearGradient-3">
+ <stop
+ stop-color="#88C649"
+ stop-opacity="0.8"
+ offset="0%"
+ id="stop19" />
+ <stop
+ stop-color="#439240"
+ stop-opacity="0.84"
+ offset="100%"
+ id="stop21" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="6.0628663"
+ inkscape:cx="5.2025331"
+ inkscape:cy="21.085151"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:showpageshadow="false"
+ borderlayer="true"
+ inkscape:window-width="1366"
+ inkscape:window-height="723"
+ inkscape:window-x="0"
+ inkscape:window-y="19"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata4235">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Capa 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1004.3622)">
+ <path
+ style="fill:#000000"
+ d=""
+ id="path906"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="fill:#000000;fill-opacity:0.01960784;stroke:none"
+ id="rect5263-0"
+ width="44.399963"
+ height="44.399963"
+ x="1.8000183"
+ y="1006.1622"
+ ry="6.2786646" />
+ <rect
+ ry="6.1938181"
+ y="1006.4623"
+ x="2.1000061"
+ height="43.799973"
+ width="43.799973"
+ id="rect5261-1"
+ style="fill:#000000;fill-opacity:0.03921569;stroke:none" />
+ <rect
+ style="fill:#000000;fill-opacity:0.07843137;stroke:none"
+ id="rect5259-9"
+ width="43.199982"
+ height="43.199982"
+ x="2.3999939"
+ y="1006.7625"
+ ry="6.1089716" />
+ <rect
+ ry="6.0241251"
+ y="1007.0624"
+ x="2.7000122"
+ height="42.599991"
+ width="42.599991"
+ id="rect5257-6"
+ style="fill:#000000;fill-opacity:0.15686275;stroke:none" />
+ <rect
+ style="fill:url(#linearGradient4101);fill-opacity:1;stroke:none"
+ id="rect5237-3"
+ width="42"
+ height="42"
+ x="3"
+ y="1007.3622"
+ ry="5.9392786" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:#000000;fill-opacity:0.11764706;stroke:none"
+ d="m 2.9999979,1040.9247 0,2.5 c 0,3.2904 2.64714,5.9375 5.9375,5.9375 l 30.1250011,0 c 3.29036,0 5.9375,-2.6471 5.9375,-5.9375 l 0,-2.5 c 0,3.2904 -2.64714,5.9375 -5.9375,5.9375 l -30.1250011,0 C 5.6471379,1046.8622 2.9999979,1044.2151 2.9999979,1040.9247 Z"
+ id="rect5265-8" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:#000000;fill-opacity:0.09803922;stroke:none"
+ d="m 2.9999979,1042.9247 0,0.5 c 0,3.2904 2.64714,5.9375 5.9375,5.9375 l 30.1250011,0 c 3.29036,0 5.9375,-2.6471 5.9375,-5.9375 l 0,-0.5 c 0,3.2904 -2.64714,5.9375 -5.9375,5.9375 l -30.1250011,0 C 5.6471379,1048.8622 2.9999979,1046.2151 2.9999979,1042.9247 Z"
+ id="path5252-0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot61"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:sans-serif"
+ transform="translate(49.11348,-2.7628869)"><flowRegion
+ id="flowRegion63"><rect
+ id="rect65"
+ width="57.6292"
+ height="49.320694"
+ x="-53.033005"
+ y="6.6342559" /></flowRegion><flowPara
+ id="flowPara67" /></flowRoot> <g
+ transform="matrix(0.05900042,0,0,0.04685494,6.1818732,1009.9069)"
+ style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
+ id="Page-1"
+ sketch:type="MSPage">
+ <g
+ id="mark-copy"
+ sketch:type="MSLayerGroup"
+ transform="translate(2,3)">
+ <path
+ style="fill:url(#linearGradient-1)"
+ inkscape:connector-curvature="0"
+ d="M 0,155.5704 155,-1 155,727 0,572.23792 0,155.5704 Z"
+ id="Left---green"
+ sketch:type="MSShapeGroup" />
+ <path
+ style="fill:url(#linearGradient-2)"
+ inkscape:connector-curvature="0"
+ d="M 443.0604,156.9824 600,-1 596.81879,727 442,572.21994 443.0604,156.9824 Z"
+ id="Right---blue"
+ sketch:type="MSShapeGroup"
+ transform="matrix(-1,0,0,1,1042,0)" />
+ <path
+ style="fill:url(#linearGradient-3)"
+ inkscape:connector-curvature="0"
+ d="M 154.98629,0 558,615.1897 445.2246,728 42,114.17202 154.98629,0 Z"
+ id="Cross---blue"
+ sketch:type="MSShapeGroup" />
+ <path
+ style="fill:#000000;fill-opacity:0.12999998"
+ inkscape:connector-curvature="0"
+ d="M 155,283.83232 154.78675,308 31,124.71061 42.461949,113 155,283.83232 Z"
+ id="Shadow"
+ sketch:type="MSShapeGroup" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/nvim-wrapper b/nvim-wrapper
new file mode 100755
index 000000000000..18de932dc81c
--- /dev/null
+++ b/nvim-wrapper
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+
+from sys import argv
+from subprocess import Popen
+from time import time
+import dbus
+
+session_bus = dbus.SessionBus()
+
+# launch the terminal server with a custom app-id and window class (so the .desktop file gets associated)
+Popen("/usr/lib/gnome-terminal/gnome-terminal-server --app-id org.neovim --class=neovim".split())
+# wait until the name is registered, or 2 seconds pass (when launching from cold cache it might more time)
+timeout = time() + 2
+while not session_bus.name_has_owner('org.neovim') and time() <= timeout:
+ pass
+# launch nvim in a gnome-terminal instance
+if session_bus.name_has_owner('org.neovim'):
+ Popen("gnome-terminal --app-id org.neovim -x nvim".split() + argv[1:])