From 6bf64e6281bd407793509fddbaaed3cf581c7caf Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Sat, 7 Oct 2023 20:40:23 +0300 Subject: [PATCH] bash/usr-local-bin/mpv: initial commit of system-wide mpv and flatpak mpvs --- bash/usr-local-bin/mpv | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 bash/usr-local-bin/mpv diff --git a/bash/usr-local-bin/mpv b/bash/usr-local-bin/mpv new file mode 100755 index 0000000..1d63083 --- /dev/null +++ b/bash/usr-local-bin/mpv @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# In case we are on SteamOS? +#set -x +# The usual system-wide installation +if [ -f /usr/bin/mpv ]; then + /usr/bin/mpv $@ +# System-wide flatpak +elif [ -f /var/lib/flatpak/exports/bin/io.mpv.Mpv ]; then + flatpak run io.mpv.Mpv $@ +# User-specific flatpak +elif [ -f ~/.local/share/flatpak/exports/bin/io.mpv.Mpv ]; then + flatpak run --user io.mpv.Mpv $@ +# If not found. +else + printf "mpv doesn't seem to be installed :(" +fi +#set +x