This repository has been archived on 2025-01-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
.bin
mpc
mpc-i3-consume
mpc-i3-playlists
mpc-i3-repeat
mpc-i3-shuffle
powerline-shell
.bashrc-global
.directory
bashrc.sh
bashrc.sh.bak
colortest
mklatex
powerline-shell.py
test-notifications
xephrice
xrdbupdate
.config
.local
.ncmpcpp
.oh-my-zsh
.themes
.vim
.Xdefaults
.Xresources
.bash_profile
.profile
.vimrc
.xinitrc
.xsessionrc
.zshrc
README.md
home/.bin/mpc/mpc-i3-playlists
Salt 6f0abd1b31 Don't restart playback when unnecessary
Because mpc-i3-playlists was doing that.
Because I'm bad.
2017-08-01 00:54:55 -05:00

18 lines
428 B
Bash
Executable File

#!/bin/bash
MESSAGE='-mesg Append:'
if [ "$1" = "--clear" ]; then
MESSAGE='-mesg Replace:'
fi
PLAYLIST="$(mpc lsplaylists | rofi -lines 10 -dmenu -p 'Play MPD Playlist: ' $MESSAGE)"
if [ "$PLAYLIST" = "" ]; then
exit
fi
if [ "$1" = "--clear" ]; then
mpc clear
fi
mpc load $PLAYLIST
if [[ "$(mpc)" != *"playing"* ]]; then
mpc play
fi
notify-send -u low -t 5 -a 'Mopidy' "$PLAYLIST" "Beginning playback of playlist $PLAYLIST"