]> git.phdru.name Git - dotfiles.git/blobdiff - bin/mplay
Fix(bin/cp_recode_fname): Fix misspelled message
[dotfiles.git] / bin / mplay
index 613aeffb59d216170c34943988f14e781362a733..decfbfe8e22fa83a39d12f50821d116c571a4a92 100755 (executable)
--- a/bin/mplay
+++ b/bin/mplay
@@ -1,15 +1,19 @@
 #! /bin/sh
 
-options="-ao pulse -quiet"
+options="--ao=pulse --quiet"
+
+if [ -n "$AUDIO_VOLUME" ]; then
+   options="$options --af=loudnorm --volume=$AUDIO_VOLUME"
+fi
 
 if [ "$DISPLAY" ]; then
    (xscreensaver-command -exit
    xset -dpms s off) &
 fi
 
-cgmem_nice 500 mpv $options "$@"
+cgmem_nice 1000 mpv $options "$@"
 
-if [ "$DISPLAY" ]; then
+if [ -n "$DISPLAY" ]; then
    cd "$HOME"
    xset +dpms s on
    xscreensaver &