diff options
Diffstat (limited to 'source/blog/2014-12-23-mpv-launcher.md')
-rw-r--r-- | source/blog/2014-12-23-mpv-launcher.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blog/2014-12-23-mpv-launcher.md b/source/blog/2014-12-23-mpv-launcher.md index bc4710e5..c8c2aee2 100644 --- a/source/blog/2014-12-23-mpv-launcher.md +++ b/source/blog/2014-12-23-mpv-launcher.md @@ -7,7 +7,9 @@ date-display: December 23, 2014 I just noticed that `daemonize` doesn't play too well with the OS; in particular, when you use dark menu bar on OS X Yosemite, apps launched with `daemonize` won't conform to that. So a native shell solution would be using `/bin/zsh` and run - mpv "$@" >/dev/null 2>&1 </dev/null &! +```zsh +mpv "$@" >/dev/null 2>&1 </dev/null &! +``` instead. @@ -17,7 +19,9 @@ instead. Today I finally gave this issue some serious thought (I've been on a bug report/enhancement request spree these days so it's natural for me to start thinking about enhancements). Turns out that there's a pretty simple workaround. I created an automator app `mpv-launcher.app` that does one thing: "Run Shell Script" (pass input as arguments) - daemonize /usr/local/bin/mpv "$@" +```bash +daemonize /usr/local/bin/mpv "$@" +``` in the shell of your choice (for me the shell of choice is `zsh` since the env would be readily available from my `zshenv`). `daemonize`, as the name suggests, daemonizes the process so that the process doesn't block; this way, `mpv-launcher.app` immediately quits after launching, making multiple "instances" possible. (`daemonize` can be installed via `brew install daemonize`; note that you need to specify the full path of the command to daemonize, which in my case is `/usr/local/bin/mpv`). And there you go. Associate your video files to `mpv-launcher.app`. Launch as many instances as you want. Enjoy. |