From facce897007e9a16726db91eacebd1120e52071c Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Mon, 31 Jul 2017 03:20:01 -0500
Subject: [PATCH] Added mopidy mode keybind for consume

---
 .bin/mpc/mpc-i3-consume | 6 ++++++
 .config/i3/config       | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100755 .bin/mpc/mpc-i3-consume

diff --git a/.bin/mpc/mpc-i3-consume b/.bin/mpc/mpc-i3-consume
new file mode 100755
index 00000000..a7695ce8
--- /dev/null
+++ b/.bin/mpc/mpc-i3-consume
@@ -0,0 +1,6 @@
+#!/bin/bash
+if [[ "$(mpc consume)" == *"consume: on"* ]]; then
+	notify-send -a "Mopidy" -u low -t 1 "Consume On" "Songs will be removed from the playlist after completion"
+else
+	notify-send -a "Mopidy" -u low -t 1 "Consume Off" "Songs will remain in the playlist after completion"
+fi
diff --git a/.config/i3/config b/.config/i3/config
index 65f3032a..855f3313 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -226,9 +226,10 @@ mode "resize" {
 bindsym $mod+r mode "resize"
 
 mode "mopidy" {
-	# Shuffle and Repeat
+	# Shuffle, Repeat, and Consume
 	bindsym s exec --no-startup-id "~/.bin/mpc/mpc-i3-shuffle"
 	bindsym r exec --no-startup-id "~/.bin/mpc/mpc-i3-repeat"
+	bindsym e exec --no-startup-id "~/.bin/mpc/mpc-i3-consume"
 
 	# Volume keys
 	bindsym Up exec --no-startup-id "mpc volume +5"