aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshmibs <shmibs@gmail.com>2015-10-31 15:58:09 -0700
committershmibs <shmibs@gmail.com>2015-10-31 15:58:09 -0700
commita1236279890f761c6f5820a672145321ee7d0c71 (patch)
tree899bbf4aa8cbb732b0f3691dd0d4b9ca5a4772fb
parent0af9cc754f458f08934f0fb322d2b94be8e0cc6c (diff)
downloaddotfiles-a1236279890f761c6f5820a672145321ee7d0c71.tar.gz
add mpc-sleep
-rw-r--r--.zshrc-linux-desktop12
1 files changed, 12 insertions, 0 deletions
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