blob: a617690e01e8e7a469335d2f14671a6d4109999f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)))
}
}
|