Skip to content

Instantly share code, notes, and snippets.

@talyric
Forked from gregd/defaults.list
Last active December 29, 2016 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talyric/5615739 to your computer and use it in GitHub Desktop.
Save talyric/5615739 to your computer and use it in GitHub Desktop.
[Default Applications]
x-scheme-handler/txmt=openInMine.desktop
#!/home/andrew/.rvm/bin/rvm-auto-ruby
#Change the #! line to reflect the location of ruby in your environment
require 'uri'
require 'cgi'
my_url = CGI::parse(URI::parse(ARGV[0]).query)
file = URI::parse(my_url['url'][0]).path
line = my_url['line'][0]
#my mine command is located in /usr/local/bin
#YMMV, change following line as needed.
exec "mine -l #{line} #{file}"
[Desktop Entry]
Name=openInMine
Comment=RubyMine mine cmd
Exec=/usr/local/bin/openInMine %u
Terminal=false
Type=Application
Categories=Application;
StartupNotify=false
MimeType=x-scheme-handler/txmt;
NoDisplay=true
@talyric
Copy link
Author

talyric commented May 20, 2013

See updated project at https://github.com/talyric/rubymine-txmt-ubuntu

or

Copy defaults.list, openInMine.desktop to ~/.local/share/applications and openInMine to /usr/local/bin
make openInMine executable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment