From a1236279890f761c6f5820a672145321ee7d0c71 Mon Sep 17 00:00:00 2001 From: shmibs Date: Sat, 31 Oct 2015 15:58:09 -0700 Subject: add mpc-sleep --- .zshrc-linux-desktop | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to '.zshrc-linux-desktop') diff --git a/.zshrc-linux-desktop b/.zshrc-linux-desktop index c34c60e..aee3aa5 100644 --- a/.zshrc-linux-desktop +++ b/.zshrc-linux-desktop @@ -1,5 +1,17 @@ ################## FUNCTIONS ################## +# power off after finishing mpd playlist +mpc-sleep() { + mpc play + while true; do + mpc status + mpc idle player + if [[ -z "$(mpc status | grep playing)" ]]; then + poweroff + fi + done +} + # capture webm scap() { archey3 -- cgit v1.2.3