Gitdev Handler
This commit is contained in:
parent
6ba14dec6d
commit
8fd4b9e705
4 changed files with 23 additions and 0 deletions
3
.local/.gitignore
vendored
3
.local/.gitignore
vendored
|
@ -4,3 +4,6 @@
|
|||
|
||||
# Include Share
|
||||
!share/
|
||||
|
||||
# Inlcude Bin for Scripts
|
||||
!bin/
|
||||
|
|
7
.local/bin/.gitignore
vendored
Normal file
7
.local/bin/.gitignore
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Ignore Everything By Default
|
||||
/*
|
||||
!.gitignore
|
||||
|
||||
# Nvim GitDev Wrapper
|
||||
!nvim-gitdev.sh
|
||||
|
5
.local/bin/nvim-gitdev.sh
Executable file
5
.local/bin/nvim-gitdev.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||
git_url=$(urldecode $1)
|
||||
# Strip 'git-dev://open/?repo='
|
||||
zsh -c "nvim -c \"GitDevOpen ${git_url/nvim-gitdev:\/\/open\/?repo=/}\""
|
8
.local/share/applications/nvim-gitdev-handler.desktop
Normal file
8
.local/share/applications/nvim-gitdev-handler.desktop
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Name=Neovim GitDev Handler
|
||||
Comment=Opens a Git URI in Neovim.
|
||||
Icon=nvim
|
||||
Exec=/home/snoweuph/.local/bin/nvim-gitdev.sh %u
|
||||
Terminal=true
|
||||
Type=Application
|
||||
MimeType=x-scheme-handler/nvim-gitdev
|
Loading…
Add table
Reference in a new issue