aboutsummaryrefslogtreecommitdiffstats
path: root/.zshrc-linux-desktop
diff options
context:
space:
mode:
Diffstat (limited to '.zshrc-linux-desktop')
-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