Gitdev Handler

This commit is contained in:
Snoweuph 2025-03-06 01:05:15 +01:00
parent 6ba14dec6d
commit 8fd4b9e705
Signed by: snoweuph
GPG key ID: BEFC41DA223CEC55
4 changed files with 23 additions and 0 deletions

3
.local/.gitignore vendored
View file

@ -4,3 +4,6 @@
# Include Share
!share/
# Inlcude Bin for Scripts
!bin/

7
.local/bin/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
# Ignore Everything By Default
/*
!.gitignore
# Nvim GitDev Wrapper
!nvim-gitdev.sh

5
.local/bin/nvim-gitdev.sh Executable file
View 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=/}\""

View 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