From 578171f1bf3f52f81e41269edf72035af86f94cb Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Mon, 31 Jul 2017 02:03:03 -0500
Subject: [PATCH] Added support for appending playlists, also tweaked mopidy

---
 .bin/mpc/mpc-i3-playlists  | 10 ++++++++--
 .config/i3/config          |  4 +++-
 .config/mopidy/mopidy.conf |  2 +-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.bin/mpc/mpc-i3-playlists b/.bin/mpc/mpc-i3-playlists
index b662f6af..00456102 100755
--- a/.bin/mpc/mpc-i3-playlists
+++ b/.bin/mpc/mpc-i3-playlists
@@ -1,9 +1,15 @@
 #!/bin/bash
-PLAYLIST="$(mpc lsplaylists | rofi -lines 10 -dmenu -p 'Play MPD Playlist: ')"
+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
-mpc clear
+if [ "$1" = "--clear" ]; then
+	mpc clear
+fi
 mpc load $PLAYLIST
 mpc play
 notify-send -u low -t 5 -a 'Mopidy' "$PLAYLIST" "Beginning playback of playlist $PLAYLIST"
diff --git a/.config/i3/config b/.config/i3/config
index 3e019266..0ca1a3bb 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -234,7 +234,9 @@ mode "media" {
 	bindsym t exec --no-startup-id "mpc toggle; notify-send -a 'Mopidy' -u low -t 1 'Toggle' 'Toggled playback'
 
 	# Start playing a playlist
-	bindsym p exec --no-startup-id "~/.bin/mpc/mpc-i3-playlists"
+	bindsym p exec --no-startup-id "~/.bin/mpc/mpc-i3-playlists --clear"
+	# Append a playlist
+	bindsym o exec --no-startup-id "~/.bin/mpc/mpc-i3-playlists"
 
 	# Skip between tracks
 	bindsym Right exec --no-startup-id "mpc next; notify-send -a 'Mopidy' -u low -t 1 'Next' 'The current song has been skipped'"
diff --git a/.config/mopidy/mopidy.conf b/.config/mopidy/mopidy.conf
index ab067899..2f5c562b 100644
--- a/.config/mopidy/mopidy.conf
+++ b/.config/mopidy/mopidy.conf
@@ -19,5 +19,5 @@ enabled = true
 
 [soundcloud]
 enabled = true
-explore_songs = 25
+explore_songs = 50
 auth_token = 1-35204-100376744-d1083c37e92bde