2020-11-02 04:08:18 +00:00
|
|
|
#!/bin/sh
|
2020-09-17 16:02:24 +00:00
|
|
|
|
2020-11-02 04:08:18 +00:00
|
|
|
DIR=$(readlink -f "$(dirname "$0")")
|
|
|
|
. "$DIR/../env.sh"
|
2020-09-17 16:02:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
# install music and video player
|
|
|
|
case "$PM" in
|
|
|
|
apt)
|
|
|
|
sudo apt install -y mpd mpc ncmpcpp mpv
|
|
|
|
;;
|
|
|
|
pacman)
|
2020-09-18 18:01:58 +00:00
|
|
|
sudo pacman -S --needed mpd mpc ncmpcpp mpv
|
2020-09-17 16:02:24 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2020-09-19 15:33:13 +00:00
|
|
|
# symlink configuration
|
2020-11-02 04:08:18 +00:00
|
|
|
lnsf "$DIR/config/mpd/mpd.conf" "$XDG_CONFIG_HOME/mpd/mpd.conf"
|
|
|
|
lnsf "$DIR/config/mpv/mpv.conf" "$XDG_CONFIG_HOME/mpv/mpv.conf"
|
|
|
|
lnsf "$DIR/config/mpv/scripts/organize.lua" "$XDG_CONFIG_HOME/mpv/scripts/organize.lua"
|
|
|
|
lnsf "$DIR/config/ncmpcpp/bindings" "$XDG_CONFIG_HOME/ncmpcpp/bindings"
|
|
|
|
lnsf "$DIR/config/ncmpcpp/config" "$XDG_CONFIG_HOME/ncmpcpp/config"
|
2020-09-19 15:33:13 +00:00
|
|
|
|
2020-09-22 10:42:13 +00:00
|
|
|
# prevent system-wide mpd
|
|
|
|
sudo systemctl disable mpd
|
|
|
|
sudo systemctl stop mpd
|
2020-11-02 04:08:18 +00:00
|
|
|
mkdir -p "$HOME/.mpd/playlists"
|
2020-09-22 10:42:13 +00:00
|
|
|
|
2020-09-19 01:23:38 +00:00
|
|
|
# enable for current user
|
|
|
|
systemctl --user enable mpd
|
|
|
|
systemctl --user start mpd
|