Skip to content

Instantly share code, notes, and snippets.

@insideone
Created March 4, 2017 15:51
Show Gist options
  • Save insideone/1c0b84f93bb0ba5a7eef46b327efb272 to your computer and use it in GitHub Desktop.
Save insideone/1c0b84f93bb0ba5a7eef46b327efb272 to your computer and use it in GitHub Desktop.
Ubuntu custom protocol (video://)
#!/bin/sh
nano ~/.local/share/applications/video.desktop
/* Содержание:
[Desktop Entry]
Name=Video
Exec=sh -c '/usr/bin/mpv --geometry=480x270-0-0 --ontop --ytdl-format=18 $(echo "%u" | sed -e "s/video:\/\///g")'
Type=Application
Terminal=false
MimeType=x-scheme-handler/video;
*/
nano ~/.local/share/applications/mimeapps.list
/* В секцию [Default Applications] добавить строку:
x-scheme-handler/video=video.desktop
*/
update-desktop-database ~/.local/share/applications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment