Advertisement
msjche

~/.config/luakit/binds.lua - play embeded videos in external

Feb 18th, 2013
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. -- Play embeded video in external player
  2. key({}, "Z", function (w)
  3. local view = w.view
  4. local uri = view.hovered_uri or view.uri
  5. if uri then
  6. luakit.spawn(string.format("urxvt -e youtube-viewer -I %q", uri))
  7. end
  8. end),
  9.  
  10. -- Download and play embeded video in external player
  11. key({}, "X", function (w)
  12. local view = w.view
  13. local uri = view.hovered_uri or view.uri
  14. if uri then
  15. luakit.spawn(string.format("urxvt -e cclive -f best '%%t.%%s' "
  16. .. "--output-dir %q --exec='mplayer \"%%f\"' %q", os.getenv("HOME") .."Downloads/YouTube", uri))
  17. end
  18. end),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement