Skip to content

Instantly share code, notes, and snippets.

@nhahv
Forked from og-shawn-crigger/mimeapps.list
Last active October 10, 2019 01:39
Show Gist options
  • Save nhahv/0651d274502c4d472260 to your computer and use it in GitHub Desktop.
Save nhahv/0651d274502c4d472260 to your computer and use it in GitHub Desktop.
#~/.local/share/applications/mimeapps.list
[Added Associations]
#...
x-scheme-handler/subl=subl-urlhandler.desktop
#/usr/share/applications/subl-urlhandler.desktop
[Desktop Entry]
Version=1.0
Name=Sublime Text 2
Name[en_PH]=Sublime Text 2
Exec=xdebug-urlhandler %u
Icon=/opt/subl/Icon/48x48/sublime_text.png
Terminal=false
Type=Application
Categories=Development;
StartupNotify=true
MimeType=x-scheme-handler/subl;
#!/bin/bash
#/usr/bin/xdebug-urlhandler
url=$1
file=${url#subl*//}
path=`expr "$file" : '\(.*\)\?@'`
line=${file#*@}
subl $path:$line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment