]> Sergey Matveev's repositories - dotfiles.git/blobdiff - mpv/bin/mp
I use nsxiv now
[dotfiles.git] / mpv / bin / mp
index 9f03422282976bb2beb7abd63bafe878c64c22d5..ed9ace04bb40279358ed083e03b595f97ce42398 100755 (executable)
@@ -1,3 +1,9 @@
-#!/usr/bin/env perl
+#!/usr/bin/env zsh
 
-exec "mpv", map { s/^([A-Z][A-Z])$/--profile=$1/ ; $_ } @ARGV;
+args=()
+for arg ($@) {
+    [[ $arg =~ "^[A-Z][A-Z0-9]$" ]] && arg="--profile=$arg"
+    args=($args $arg)
+}
+export vblank_mode=1
+exec mpv $args