.config
.local
bin
bootstrap
layout
mpc
mpc-i3-consume
mpc-i3-playlists
mpc-i3-repeat
mpc-i3-shuffle
test
.bashrc-global
.directory
bashrc.sh
bashrc.sh.bak
mklatex
mpv-xwinwrap
powerline-shell.py
tde.bin
wal-set
xephrice
xrdbupdate
.ncmpcpp
.oh-my-zsh
.themes
.vim
System
.Xresources
.bash_profile
.bashrc
.bin
.gitmodules
.profile
.vimrc
.xinitrc
.xsessionrc
.zshrc
18 lines
428 B
Bash
Executable File
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"
|