Allows searching for YouTube videos and playing the first result with mpv. Requires youtube-dl to be installed for search and play YouTube videos with mpv.
The original repository will be stored on GitHub. You can use the original reopsitory if you want to use GitHub. Also issues and pull requests will be collected there for convenience.
This repository will be cloned to my own server. You can use the clone instead of this repository if you want to avoid use GitHub.
- Clone project
- Add following line to your
.zshrc
:
source "path/to/repo/mpv-yt-search.plugin.zsh"
- Clone project into
~/.oh-my-zsh/custom/plugins/mpv-yt-search
- Add
mpv-yt-search
to your plugin list
plugins=(… mpv-yt-search …)
- Add following line to your
.zshrc
:
antigen bundle Zocker1999NET/zsh-mpv-yt-search # GitHub if default repository unchanged
antigen bundle https://git.banananet.work/zsh-plugins/mpv-yt-search # Own Server
or
- Add the repository to your plugin list
antigen bundles <<EOBUNDLES
…
Zocker1999NET/zsh-mpv-yt-search # GitHub if default repository unchanged
https://git.banananet.work/zsh-plugins/mpv-yt-search # Own Server
…
EOBUNDLES
- Add following line to your
.zshrc
:
antibody bundle Zocker1999NET/zsh-mpv-yt-search # GitHub if default repository unchanged
antibody bundle https://git.banananet.work/zsh-plugins/mpv-yt-search # Own Server
or
- Add the repository to your plugin list
antibody bundles <<EOBUNDLES
…
Zocker1999NET/zsh-mpv-yt-search # GitHub if default repository unchanged
https://git.banananet.work/zsh-plugins/mpv-yt-search # Own Server
…
EOBUNDLES
Command | Description |
---|---|
yt *search terms* |
Plays first result as video |
yta *search terms* |
Plays first result as audio-only (only streams audio data if possible) |
This plugin is licensed under WTFPL. Do the fuck you want to with this plugin, but please contribute to this plugin if you have made any improvements which could be useful for others.
If you find any issue, report it or fix it yourself and create a pull request.
The code for the command yta
was taken originally from the mpv Arch Wiki page.
Further the command yt
was added and the commands can now be imported by others easily.