alexanderepstein / Bash-Snippets

A collection of small bash scripts for heavy terminal users
MIT License
9.64k stars 842 forks source link

ytview default player selection #192

Closed webmastak closed 5 years ago

webmastak commented 5 years ago

Manjaro Linux 64 Bit

You can add a configuration to ytview so that you can use the default player that the user wants?

What not to do dirty hack: My mpv player

getConfiguredPlayer()
{
  if [[ $(uname -s) == "Linux" ]]; then
    if command -v mpv &>/dev/null; then
      player="mpv"
    elif command -v vlc &>/dev/null; then
      player="vlc"
    elif command -v mplayer &>/dev/null; then
      player="mplayer"
    else
alexanderepstein commented 5 years ago

We can check for an environment variable to be set, if its not set we run down this list in the same order, if it is set we attempt to use that player.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has been inactive for 30 days.

alexanderepstein commented 5 years ago

This was just added to Version 1.23.0!