aboutsummaryrefslogtreecommitdiff
path: root/alsa/src/config.rs
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2024-01-24 21:40:48 +0100
committerAndreas Grois <andi@grois.info>2024-01-24 21:40:48 +0100
commit57fd648407a233ae62b2c561d902783597274f83 (patch)
tree6c4149d45eebfd3374d18c61ff766c8e0814f322 /alsa/src/config.rs
parent3f362de1ab94b994ef4ccdc403cab4cb8d0d1bcb (diff)
Start work on ALSA volume display
Diffstat (limited to 'alsa/src/config.rs')
-rw-r--r--alsa/src/config.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/alsa/src/config.rs b/alsa/src/config.rs
new file mode 100644
index 0000000..a617690
--- /dev/null
+++ b/alsa/src/config.rs
@@ -0,0 +1,19 @@
+use std::sync::mpsc::channel;
+
+use serde::{Serialize, Deserialize};
+use swaystatus_plugin::*;
+
+use crate::{runnable::AlsaVolumeRunnable, communication::SenderForMain};
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AlsaVolumeConfig{
+
+}
+
+
+impl SwayStatusModuleInstance for AlsaVolumeConfig {
+ fn make_runnable<'p>(&'p self, to_main : Box<dyn MsgModuleToMain + 'p>) -> (Box<dyn SwayStatusModuleRunnable + 'p>, Box<dyn MsgMainToModule + 'p>) {
+ let (s,r) = channel();
+ (Box::new(AlsaVolumeRunnable::new(to_main, r, self)), Box::new(SenderForMain::new(s)))
+ }
+}