From edef92290282f06e2d808127f574774f0c4ae50b Mon Sep 17 00:00:00 2001 From: 409 Date: Mon, 1 Jul 2024 13:22:02 +0200 Subject: [PATCH 1/2] feat: automatically select new sink input if the current selection is none --- src/mixer.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mixer.rs b/src/mixer.rs index ce1be16..d58a4d5 100644 --- a/src/mixer.rs +++ b/src/mixer.rs @@ -237,6 +237,10 @@ impl Mixer { let sink_input = result.lock().unwrap().take(); if let Some(sink_input) = sink_input { self.sink_inputs.insert(sink_index, sink_input); + + if self.selected_index.lock().unwrap().is_none() { + self.select_next(); + } } } PulseInstruction::RemoveSinkInput(sink_index) => { From 7d810a603a6238127884393dd6374ea0bca6be84 Mon Sep 17 00:00:00 2001 From: 409 Date: Wed, 3 Jul 2024 14:41:03 +0200 Subject: [PATCH 2/2] docs: add hint to byte 5 in the table --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e203bc1..a02dee3 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Mixrs will create a unix socket at `/tmp/mixrs` and listen for instructions. Ins |2|ToggleMuteCurrent|Toggles the current sink input's muted state| |3|IncreaseCurrent|Increases the current sink input's volume by 5%| |4|DecreaseCurrent|Decreases the current sink input's volume by 5%| -|5|GetCurrent|Displays the current sink input's name| +|5|GetCurrent|Displays the current sink input's name
*Has no effect when using `--silent`*| |6|PlayPauseCurrent|Tells the current sink input to toggle its `playing` state.
*Behavior varies based on the current sink input's player*| |7|PlayNext|Tells the current sink input to play the next item (e.g. the next song).
*Behavior varies based on the current sink input's player*| |8|PlayPrevious|Tells the current sink input to play the previous item (e.g. the previous song).
*Behavior varies based on the current sink input's player*|