From 786218f70e26cd93498e7d56c0083600467d1056 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 12 Feb 2023 15:26:32 -0600 Subject: [PATCH] modify browser.sh audio option to use mpc to queue the audio file. add mpc as dependency --- browser.sh | 28 ++++++++++++++++++---------- installers/arch/ajh-base/PKGBUILD | 3 ++- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/browser.sh b/browser.sh index 0b1747d..3483be9 100755 --- a/browser.sh +++ b/browser.sh @@ -54,23 +54,31 @@ select" sel() { SEL="$( echo "$OPTS" | bemenu)" - [ "$SEL" = "Web" ] && $WBROWSER "$1" && exit - [ "$SEL" = "Video" ] && mpv "$1" && exit + case "$SEL" in - [ "$SEL" = "YT" ] && mpv --ytdl-format=18 "$1" && exit + "Web") $WBROWSER "$1" ;; - [ "$SEL" = "Audio" ] && $TERMINAL -e mpv "$1" && exit + "Video") mpv "$1";; - [ "$SEL" = "Youtube-dl audio" ] && ydl "$1" && exit + "YT") mpv --ytdl-format=18 "$1";; - [ "$SEL" = "File" ] && cd "$XDG_DOWNLOAD_DIR" && curl -O -L "$1" && exit + "Audio") mpc insert "$1" + mpc next + mpc play ;; - [ "$SEL" = "RSS" ] && rss "$1" && exit + "Youtube-dl audio") ydl "$1" ;; + + "File") cd "$XDG_DOWNLOAD_DIR" && curl -O -L "$1";; + + "RSS") rss "$1";; + + "Torrent") transadd "$1";; + + esac + + exit - [ "$SEL" = "Torrent" ] && transadd "$1" && exit - -#$WBROWSER "$1" } if [ -z "$1" ]; then diff --git a/installers/arch/ajh-base/PKGBUILD b/installers/arch/ajh-base/PKGBUILD index cb8fc05..f0c2f9b 100644 --- a/installers/arch/ajh-base/PKGBUILD +++ b/installers/arch/ajh-base/PKGBUILD @@ -1,7 +1,7 @@ pkgname="ajh-base" pkgver="1.0.0" pkgver="1" -pkgrel="7" +pkgrel="8" pkgdesc="Install my config for Arch based systems." arch=("x86_64") @@ -78,6 +78,7 @@ depends=( "chafa" "bat" "ncmpcpp" +"mpc" "bc" "transmission-cli" "neovim"