summaryrefslogtreecommitdiff
path: root/src/wasp-obs.el
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-08-18 03:04:31 -0400
committerLLLL Colonq <llll@colonq>2026-08-18 03:04:31 -0400
commit23cc4ab7b5695f77ffd15f5ee5e7cc414237642f (patch)
tree07ac5ee48cc3773664fda24b227618422b468ec9 /src/wasp-obs.el
parentf04ada478f4bfa5637744876f00ff56f85dcf552 (diff)
Diffstat (limited to 'src/wasp-obs.el')
-rw-r--r--src/wasp-obs.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/wasp-obs.el b/src/wasp-obs.el
index 921f497e..2fc65553 100644
--- a/src/wasp-obs.el
+++ b/src/wasp-obs.el
@@ -11,7 +11,12 @@
(defun w/obs-toggle (scene source)
"Toggle SOURCE in SCENE."
- (w/pub '(monitor obs toggle) (list (w/encode-string scene) (w/encode-string source))))
+ (w/binary-pub "monitor obs toggle" (s-concat scene "\0" source)))
+
+(defun w/obs-set-volume (input v)
+ "Set the volume for INPUT to V."
+ (unless (numberp v) (error "Volume should be a number, got %s" v))
+ (w/binary-pub "monitor obs set-volume" (s-concat input "\0" (format "%f" v))))
(defun w/obs-toggle-modclonk ()
"Toggle the MODCLONK panel."
@@ -60,12 +65,12 @@
(defun w/obs-toggle-activate-nixos ()
"Toggle the explosion effect."
- (w/pub '(monitor obs toggle) (list "Main" "Activate NixOS")))
+ (w/obs-toggle "Main" "Activate NixOS"))
(defun w/obs-set-clickbait-text (msg)
"Change the clickbait text to MSG."
- (w/pub '(monitor obs set-text)
- (list (w/encode-string "Red Arrow Text") (w/encode-string (s-trim msg)))))
+ (w/binary-pub "monitor obs set-text"
+ (s-concat "Red Arrow Text\0" (s-trim msg))))
(defun w/obs-toggle-clickbait (&optional msg)
"Toggle the clickbait arrow.