Created
March 4, 2017 15:51
-
-
Save insideone/1c0b84f93bb0ba5a7eef46b327efb272 to your computer and use it in GitHub Desktop.
Ubuntu custom protocol (video://)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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