diff options
author | shmibs <shmibs@gmail.com> | 2015-10-31 15:58:09 -0700 |
---|---|---|
committer | shmibs <shmibs@gmail.com> | 2015-10-31 15:58:09 -0700 |
commit | a1236279890f761c6f5820a672145321ee7d0c71 (patch) | |
tree | 899bbf4aa8cbb732b0f3691dd0d4b9ca5a4772fb /.zshrc-linux-desktop | |
parent | 0af9cc754f458f08934f0fb322d2b94be8e0cc6c (diff) | |
download | dotfiles-a1236279890f761c6f5820a672145321ee7d0c71.tar.gz |
add mpc-sleep
Diffstat (limited to '.zshrc-linux-desktop')
-rw-r--r-- | .zshrc-linux-desktop | 12 |
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 |