Permalink
Browse files

[bashrc] Add yt function to stream YouTube videos to mplayer.

  • Loading branch information...
1 parent 1125808 commit 3266c49ce62be38816129a1585a404a5c30227b2 @mfs committed Feb 25, 2012
Showing with 7 additions and 0 deletions.
  1. +2 −0 README.markdown
  2. +5 −0 bashrc
View
@@ -14,10 +14,12 @@ Arch Linux forums. In particular:
- cpf, mvf, goto by [drcouzelis and brisbin33][4]
- cfg based on Peasantoid's Python [string manager][5]
- [define is by gadamat][6]
+- yt is from [this YouTube video][7]
[1]: http://bbs.archlinux.org/viewtopic.php?id=56646
[2]: http://bbs.archlinux.org/viewtopic.php?pid=658127#p658127
[3]: http://bbs.archlinux.org/viewtopic.php?pid=493337#p493337
[4]: http://bbs.archlinux.org/viewtopic.php?pid=697235#p697235
[5]: http://bbs.archlinux.org/viewtopic.php?id=89030
[6]: https://bbs.archlinux.org/viewtopic.php?pid=912445#p912445
+[7]: http://www.youtube.com/watch?v=QCuq0_nY3Xk
View
@@ -199,6 +199,11 @@ function aur {
ls -lh
}
+function yt {
+ mplayer -fs -cookies -cookies-file /tmp/cookie.txt \
+ $(youtube-dl -g --cookies /tmp/cookie.txt "$1")
+}
+
function tputcolors {
local txtund=$(tput sgr 0 1) # Underline
local txtbld=$(tput bold) # Bold

0 comments on commit 3266c49

Please sign in to comment.