summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-12-01 09:28:54 -0500
committerSacha Chua <sacha@sachachua.com>2022-12-01 09:28:54 -0500
commit95d63d436e6820354a89a05dff349c65190a18a2 (patch)
treeb93dad5e5628cb90c91f3658f4f1f4a2563e1a2f
parent5c2b5665aa6f09f225afdf4596d1343ddc450d80 (diff)
downloademacsconf-el-95d63d436e6820354a89a05dff349c65190a18a2.tar.xz
emacsconf-el-95d63d436e6820354a89a05dff349c65190a18a2.zip
add pamix console
Diffstat (limited to '')
-rw-r--r--emacsconf-hyperlist.el2
-rw-r--r--emacsconf-stream.el24
2 files changed, 25 insertions, 1 deletions
diff --git a/emacsconf-hyperlist.el b/emacsconf-hyperlist.el
index 8cc8032..56114c3 100644
--- a/emacsconf-hyperlist.el
+++ b/emacsconf-hyperlist.el
@@ -23,7 +23,7 @@
(defun emacsconf-hyperlist-audio (source)
(format
- "%s: pamix (F3 output) [[elisp:(emacsconf-stream-audio-quieter \"${track}\" \"%s\")][quieter]] [[elisp:(emacsconf-stream-audio-louder \"${track}\" \"%s\")][louder]] %s"
+ "%s: [[elisp:(emacsconf-stream-audio-mixer \"${track}\")][mixer (F3 output)]] [[elisp:(emacsconf-stream-audio-quieter \"${track}\" \"%s\")][quieter]] [[elisp:(emacsconf-stream-audio-louder \"${track}\" \"%s\")][louder]] %s"
source
source source
(mapconcat (lambda (val)
diff --git a/emacsconf-stream.el b/emacsconf-stream.el
index c49ec90..9d14696 100644
--- a/emacsconf-stream.el
+++ b/emacsconf-stream.el
@@ -908,6 +908,30 @@ ffplay URL
"pactl list sinks | perl -000ne 'if(/%s/){/Volume:.*?([0-9]+%%)/;print \"$1\n\"}'"
source)))))
+(defvar emacsconf-stream-console '("konsole" "-e"))
+(defvar emacsconf-stream-mixer "pamix")
+
+(defun emacsconf-stream-audio-mixer (track)
+ (interactive (list (emacsconf-complete-track)))
+ (setq track (emacsconf-get-track track))
+ (let ((info (tramp-dissect-file-name (emacsconf-stream-track-login track))))
+ (apply
+ #'start-process
+ (delq nil
+ (append
+ (list
+ (concat "mixer-" (plist-get track :id))
+ (concat "*" (plist-get track :name) "*"))
+ emacsconf-stream-console
+ (list
+ "ssh"
+ "-t"
+ (concat (tramp-file-name-user info)
+ "@" (tramp-file-name-host info))
+ "-p" (tramp-file-name-port info)
+ (format "DISPLAY=%s" (plist-get track :vnc-display))
+ emacsconf-stream-mixer))))))
+
;; (emacsconf-stream-audio-get-volume "General" "qa")
;; (emacsconf-stream-audio-louder "General" "qa")
;; (emacsconf-stream-audio-quieter "General" "qa")