Skip to content

Commit

Permalink
modify browser.sh audio option to use mpc to queue the audio file.
Browse files Browse the repository at this point in the history
add mpc as dependency
  • Loading branch information
ahub2 committed Feb 12, 2023
1 parent f7c17f4 commit 786218f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
28 changes: 18 additions & 10 deletions browser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion installers/arch/ajh-base/PKGBUILD
Original file line number Diff line number Diff line change
@@ -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")

Expand Down Expand Up @@ -78,6 +78,7 @@ depends=(
"chafa"
"bat"
"ncmpcpp"
"mpc"
"bc"
"transmission-cli"
"neovim"
Expand Down

0 comments on commit 786218f

Please sign in to comment.