diff options
author | Thanos Apollo <[email protected]> | 2023-07-06 12:16:31 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-07-06 12:16:31 +0300 |
commit | 971a18d256f515742752b21dfbddfad74f7c90d1 (patch) | |
tree | b8dfdf238831d243fab857f38a6903029b042f6c | |
parent | 6cabd95fa89e93fc5cd6bea6e958784cb8c17a62 (diff) |
Add yeetube-toggle-pause-mpv
Play/pause mpv
-rw-r--r-- | yeetube.el | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -132,6 +132,13 @@ It's recommended you keep it as the default value." (if (equal yeetube-player "mpv --input-ipc-server=/tmp/mpvsocket") "mpv --no-video --input-ipc-server=/tmp/mpvsocket" "mpv --input-ipc-server=/tmp/mpvsocket")))) + +(defun yeetube-toggle-pause-mpv () + "Play/Pause mpv." + (interactive) + (when yeetube-player + (shell-command "echo '{ \"command\": [\"cycle\", \"pause\"] }' | socat - /tmp/mpvsocket"))) + ;; we should use something like ;; (decode-coding-region (point-min) (point-max) 'utf-8 ;; (get-buffer-create "decoded")) |