[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mpv ce3bbfac36 22/50: add mpv-default-options
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mpv ce3bbfac36 22/50: add mpv-default-options |
Date: |
Tue, 28 Dec 2021 00:58:40 -0500 (EST) |
branch: elpa/mpv
commit ce3bbfac3630efb37bd4aa00a5312267ed3afa46
Author: Johann Klähn <kljohann@gmail.com>
Commit: Johann Klähn <kljohann@gmail.com>
add mpv-default-options
---
mpv.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/mpv.el b/mpv.el
index 7490921bff..908fc4c951 100644
--- a/mpv.el
+++ b/mpv.el
@@ -55,6 +55,10 @@
"Name or path to the mpv executable."
:type 'file)
+(defcustom default-options nil
+ "List of default options to be passed to mpv."
+ :type '(repeat string))
+
(defcustom speed-step 1.10
"Scale factor used when adjusting playback speed."
:type 'number)
@@ -73,14 +77,16 @@
"Start an mpv process with the specified ARGS.
If there already is an mpv process controlled by this Emacs instance,
-it will be killed."
+it will be killed. Options specified in `mpv-default-options' will be
+prepended to ARGS."
(kill)
(let ((socket (make-temp-name
(expand-file-name "mpv-" temporary-file-directory))))
(setq -process
(apply #'start-process "mpv-player" nil executable
"--no-terminal"
- (concat "--input-unix-socket=" socket) args))
+ (concat "--input-unix-socket=" socket)
+ (append default-options args)))
(set-process-query-on-exit-flag -process nil)
(while (and (live-p) (not (file-exists-p socket)))
(sleep-for 0.05))
@@ -154,7 +160,9 @@ drops unsolicited event messages."
(defun play (path)
"Start an mpv process playing the file at PATH.
-You can use this with `org-add-link-type' or `org-file-apps'."
+You can use this with `org-add-link-type' or `org-file-apps'.
+See `mpv-start' if you need to pass further arguments and
+`mpv-default-options' for default options."
(interactive "fFile: ")
(start path))
- [nongnu] elpa/mpv 9e1781249f 27/50: convert numbers to strings before encoding as JSON, (continued)
- [nongnu] elpa/mpv 9e1781249f 27/50: convert numbers to strings before encoding as JSON, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 79e01bf89b 35/50: Remove stale socket files when mpv process is gone, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 4dddd55c5e 41/50: Add mpv-version., ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 2d40c45505 38/50: Add mpv-seek and mpv-revert-seek commands, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv a5c6eed9ac 44/50: Add volume control commands, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 3a43c9e60a 14/50: reorder function definitions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 338af25d20 23/50: add mpv-on-event-hook, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 937bdf522a 17/50: implement seeking and changing of playback speed, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 0e4318b45f 13/50: improve docstrings, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 0579b5c707 09/50: support inserting org timer list items, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv ce3bbfac36 22/50: add mpv-default-options,
ELPA Syncer <=
- [nongnu] elpa/mpv 9ef359d712 20/50: fix generation of autoloads, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 9ff4d5d80b 25/50: fix mpv-insert-playback-position, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 705e81b8a6 42/50: Make mpv-version more verbose and update its docstring as suggested, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv ed83369372 39/50: Fix mpv-seek-to-position-at-point for start-of-playback position, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 2d24187f7b 43/50: Merge pull request #9 from firmart/patch-mpv-version, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv ed9c7b0028 21/50: move functions to public interface, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv ec4929ad5d 19/50: fix package header for melpa, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 9bd6d36cc7 50/50: Fix #16, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 32f1478ed2 33/50: Remove dependency on names package, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 6cf13615a7 49/50: Add commands to go to next/prev entry on the playlist (#20), ELPA Syncer, 2021/12/28